udp client communication

Apr 7 2009 9:31 AM
I am making a lan messanger using udp client connection..

In order to receive datagrams through an UDP connection I have created an object of type UDPClient.

 receivedNotificationSock = new UdpClient();

However once done and on using the receive method:

 receivedHostNameBuffer=receivedNotificationSock.Receive(ref receivedNotificationIP);

I am getting an exception saying that I must call the bind method. But there is no bind method in the UDPClient class. Could You guys please provide me with the code if possible as to what should be done to overcome this exception.



Answers (1)