how to define only one thread for many connection?

skoen hadassa.koen at gmail.com
Wed Nov 24 11:11:33 EST 2010


when you define a new NioServerSocketChannelFactory, "Once a connection is
accepted successfully, the boss thread passes the accepted Channel to one of
the worker threads that the NioServerSocketChannelFactory manages. " It's
mean that NioServerSocketChannelFactory manages one thread per connection.
if you use Executors.newSingleThreadExecutor() as parameter for the
workerExecutor, 2 clients can't connect the server at the same time.

How can I use only one thread for many connections? 
-- 
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/how-to-define-only-one-thread-for-many-connection-tp5770923p5770923.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list