NioServerSocketChannel with only one worker thread

Benoit Perroud benoit at noisette.ch
Tue Jan 25 03:14:03 EST 2011


setting workerCount to 1 does not mean "only one connection at the
same time", but "only one thread is dealing with I/O".

Have a look at handler like
http://james.apache.org/protocols/apidocs/org/jboss/netty/handler/connection/ConnectionPerIpLimitUpstreamHandler.html
in order to limit the number of simultaneous incoming connections.



2011/1/25 lepe <lennart.petersson at redpill-linpro.com>:
>
> Tried to use constructor NioServerSocketChannel(Executor boss, Executor
> worker, int workerCount) with 1 as the value of workerCount but still can I
> have two connected clients to make calls on my server.
>
> If I instead use the constructor without workerCount and uses a
> NewFixedThreadPool with value of 1 it works as I expect - that more then one
> client may connect but only one can make calls on the connection.
>
> Am I misunderstanding the NioServerSocketChannel constructor, or is there
> another problem involved here?
>
> Version of Netty is 3.2.1.Final-r2319
>
> regards,
>
> /L
> --
> View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/NioServerSocketChannel-with-only-one-worker-thread-tp5957831p5957831.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