GodSharp.Socket icon indicating copy to clipboard operation
GodSharp.Socket copied to clipboard

udp服务器怎么用?

Open chaojicpu opened this issue 4 years ago • 1 comments

大佬好,能不能提供一个udp服务器用法,研究了半天,没研究明白,谢谢

chaojicpu avatar Aug 29 '21 14:08 chaojicpu

只需要指定本地端口,把远程端口设置为0就可以了。

IUdpClient client = new UdpClient("10.0.0.10",0, 11500);

OnReceived方法中判断客户端。

seayxu avatar Aug 30 '21 02:08 seayxu