udpSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); //Assign the any IP of the machine and listen on port number 5000 IPEndPoint ipEndPoint = new IPEndPoint(IPAddress.Any, 5000); //Bind this address to the server udpSocket.Bind(ipEndPoint); IPEndPoint ipeSender = new IPEndPoint(IPAddress.Any, 5000); //The epSender identifies the incoming clients EndPoint epSender = (EndPoint)ipeSender; //Start receiving data udpSocket.BeginReceiveFrom(byteData, 0, byteData.Length, SocketFlags.None, ref epSender, new AsyncCallback(ReceiveAnnounce), epSender);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)