Multiplexing a client connection

JonY jonathan.yonker at lmco.com
Tue Jul 28 21:09:29 EDT 2009


Hello Everyone,

I'm pretty new to netty, and I'm having a little trouble implementing a
solution that I believe netty can handle. What I have so far is an
application that contains a client bootstrap and a server bootstrap. The
server accepts multiple connections and writes them to the client
bootstrap's one persistent channel. The way I've done this is by passing the
client bootstrap's channel to the server's handler and writing to it (I'm
assuming there's a better/safer way to do this?). 

In addition to improving my current implementation, I need to be able to
reconnect the client piece if the connection dies (i.e. unplugging the
cable). I've tried reconnecting the channel in the client handler, but the
channel sometimes gets closed even if the connection dies. I've also tried a
number of other solutions involving trying to reconnect the bootstrap, etc
from the exceptionCaught handler.

Given my current implementation, I need some way to reconnect the client
bootstrap and then send the new channel to the server bootstrap. The server
bootstrap then needs to start writing all of the data that has been queuing
on the old channel to the new channel.

Any help/suggestions would be greatly appreciated!

Jon
-- 
View this message in context: http://n2.nabble.com/Multiplexing-a-client-connection-tp3347008p3347008.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list