Client Channel and thread safety

Trustin Lee trustin at gmail.com
Mon Oct 12 22:01:03 EDT 2009


This question has been answered in the following duplicate post:
http://n2.nabble.com/Client-Channel-and-thread-safety-tp3809955p3809955.html


Shay Banon wrote:
> 
> 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
> 


-----
— Trustin Lee, http://gleamynode.net/
-- 
View this message in context: http://n2.nabble.com/Client-Channel-and-thread-safety-tp3804755p3811907.html
Sent from the Netty User Group mailing list archive at Nabble.com.



More information about the netty-users mailing list