Get auto-asigned local IP address of TcpListener

前端 未结 0 1253
忘了有多久
忘了有多久 2021-01-13 21:39

Here\'s my code:

TcpListener listener = new TcpListener(IPAddress.Any, 0);
listener.Start();
var v = (IPEndPoint)listener.LocalEndpoint;

Acco

相关标签:
回答
  • 消灭零回复
提交回复
热议问题