G
Guest
Hi all,
i tried creating a UDP Asynchronous Server.....but am getting errors and am
not able to figure out why!!!.........
here is the code...........
*****************************code starts ********************
m_mainSocket = new Socket(AddressFamily.InterNetwork,
SocketType.Dgram,
ProtocolType.Udp);
IPHostEntry localHostEntry;
localHostEntry = Dns.GetHostByName(Dns.GetHostName());
IPEndPoint ipLocal = new IPEndPoint(localHostEntry.AddressList[0], port);
// Bind to local IP Address...
m_mainSocket.Bind( ipLocal );
// Start listening...
m_mainSocket.Listen(4);
// Create the call back for any client connections...
m_mainSocket.BeginAccept(new AsyncCallback (OnClientConnect), null);
*****************************code ends here********************
The error message is...
ATTEMPTED OPERATION IS NOT SUPPORTED FOR THE TYPE OF OBJECT REFERENCED
what is this error regarding?..
i would be happy if someone could help me around...
thanks in advance...
with regards,
C.C.Chakkaradeep
i tried creating a UDP Asynchronous Server.....but am getting errors and am
not able to figure out why!!!.........
here is the code...........
*****************************code starts ********************
m_mainSocket = new Socket(AddressFamily.InterNetwork,
SocketType.Dgram,
ProtocolType.Udp);
IPHostEntry localHostEntry;
localHostEntry = Dns.GetHostByName(Dns.GetHostName());
IPEndPoint ipLocal = new IPEndPoint(localHostEntry.AddressList[0], port);
// Bind to local IP Address...
m_mainSocket.Bind( ipLocal );
// Start listening...
m_mainSocket.Listen(4);
// Create the call back for any client connections...
m_mainSocket.BeginAccept(new AsyncCallback (OnClientConnect), null);
*****************************code ends here********************
The error message is...
ATTEMPTED OPERATION IS NOT SUPPORTED FOR THE TYPE OF OBJECT REFERENCED
what is this error regarding?..
i would be happy if someone could help me around...
thanks in advance...
with regards,
C.C.Chakkaradeep