I have a server to which clients are connected using TCP connection.

All the clients broadcast to each other using UDP braodcasting.I want to disconnect one of the client from the UDP connections from server.

what can be the possible ways to do this?

please suggest.

5 Years
Discussion Span
Last Post by jwala

UDP is a connectionless protocol. What exactly do you mean by "disconnect the client" when there is no connection?

ps Are you thinking of the connect method in DatagramSocket? - that just simplifies the syntax for sending messages by pre-determining the addresses. From the server end you can ignore that. If you want, for some reason, the client to execute a disconnect() then I think you will have to make the server send a request to the client for the client to "disconnect". However, even if you do that the client can still send datagrams to the server, so if the intention is to prevent further messages from the server you will have to implement some kind of filter on the messages that he server receives.

Edited by JamesCherrill: ps

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.