0

I have created a socket listener which reads data from the specific port and works fine if I run this application clicking on exe. But when it runs from window startup then socket listener can not read data from socket.

Following code is in Form1_Load function

UdpClient udpClient = new UdpClient(8010);
while (true)
{
    IPEndPoint RemoteIpEndPoint = new IPEndPoint(IPAddress.Any, 0);
    Byte[] receiveBytes = udpClient.Receive(ref RemoteIpEndPoint);
    string returnData = Encoding.ASCII.GetString(receiveBytes);

}
MD SHAHIDUL ISLAM
  • 14,325
  • 6
  • 82
  • 89

0 Answers0