how to define only one thread for many connection?

Christian Migowski chrismfwrd at gmail.com
Tue Nov 30 01:39:21 EST 2010


Hello,

please read the Javadoc of NioServerSocketChannelFactory [1],
especially the general class introduction and the constructors. You'll
find the answer and reasons in there.

regards,
christian!

[1] http://docs.jboss.org/netty/3.2/api/org/jboss/netty/channel/socket/nio/NioServerSocketChannelFactory.html

On Wed, Nov 24, 2010 at 5:11 PM, skoen <hadassa.koen at gmail.com> wrote:
>
> 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.
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>


More information about the netty-users mailing list