Client Channel and thread safety

Shay Banon kimchy at gmail.com
Sun Oct 11 16:57:05 EDT 2009


Hi,

   Quick questions, when using client bootstrap, and connecting to a
specific host, I get a channel back. My questions are:

1. Can the client bootstrap be used to connect to different host+port? (I am
pretty sure yes, just making sure).
2. Is the Channel that you get back from the connect operation is thread
safe? i.e., can I do something like this:

    ChannelBuffer cb = ... (build a new channel buffer, and fill it with
content)
    channel.write(cb)

When channel is shared between threads, and the above code can be called
concurrently?

Thanks,
Shay
-- 
View this message in context: http://n2.nabble.com/Client-Channel-and-thread-safety-tp3804755p3804755.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list