Safe way to disconnect the client from the server?

ovokinder kindernade at gmail.com
Tue Jul 20 12:22:10 EDT 2010


On the client side, do something like:

channel.write(yourLastMessage).addListener(CLOSE);

That'll ensure that the socket will only be closed on client side after that
message has been written.

Mind you, if you're getting I/O Exception on the server it means the socket
isn't being properly terminated on client side. When client properly shuts
down socket, you get channelDisconnected() triggered, not exceptionCaught().


Bruno
-- 
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Safe-way-to-disconnect-the-client-from-the-server-tp5311199p5317338.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list