Sending and Receiving UDP packets

后端 未结 2 1368
情歌与酒
情歌与酒 2020-12-06 08:11

The following code sends a packet on port 15000:

int port = 15000;
UdpClient udp = new UdpClient();
//udp.EnableBroadcast = true;  //This was suggested in a          


        
2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-06 08:35

    There is actually a very good UDP example of a server and listener on MSDN: Simple UDP example

提交回复
热议问题