Reputation: 3
when i try make UDP Socket Listener on server and Accept connection from client get this erroe when call voiceSocket.Listen(5);
"The attempted operation is not supported for the type of object referenced" this all code:
voiceSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
voiceSocket.Bind(new IPEndPoint(IPAddress.Any, VPORT));
voiceSocket.Listen(5);
voiceSocket.BeginAccept(VoiceAceptCallback, null);
Upvotes: 0
Views: 1422
Reputation: 16266
UDP (ProtocolType.Udp
) is connection-less protocol, you just send or receive data w/o any idea if there's somebody else on the other end of the line.
Probably you need TCP
Upvotes: 1