Sherif Abdalla
Sherif Abdalla

Reputation: 3

UDP Socket Listener

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

Answers (1)

Andriy Tylychko
Andriy Tylychko

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

Related Questions