connections waiting on condition before sending the response
Benoit Perroud
benoit at noisette.ch
Sun Jan 16 11:07:50 EST 2011
Thanks for your reply.
Shame on me, the problem was I tried into Firefox, and the default
configuration of Firefox is to allow only two simultaneous connections
to the same host... Thus it was not Netty blocking the connections, but
Firefox.
When I test another more regular way, everything rocks impressively !!
Kind regards,
Benoit.
On 01/16/2011 03:28 PM, Norman Maurer wrote:
> Could you show us your Code?
>
> Bye
> Norman
>
>
> Am Sonntag, 16. Januar 2011 schrieb Benoit Perroud<benoit at noisette.ch>:
>> Hi again,
>>
>> I went a bit further with my problem (and also my understanding of Netty
>> :)).
>>
>> I have the following flow now : a pipeline with an ExecutionHandler at
>> the latest stage, which will put the MessageEvent into a queue which
>> will processed by another thread in a near future. It works better, but
>> the point is that I still cannot accept more than 2 connections at the
>> same time, other coming connections stuck before the pipeline.
>>
>> I initialize my ServerBoostrap like this :
>>
>> ServerBootstrap bootstrap = new ServerBootstrap(
>> new NioServerSocketChannelFactory(
>> Executors.newCachedThreadPool(),
>> Executors.newCachedThreadPool()));
>>
>> Then I set the pipeline factory (with a shared pool executor at the
>> latest stage) and finally I bind.
>>
>> The connections wait as expected, but as soon as I have two connections
>> waiting, no one can be processed. Seems like NO/I worker are not
>> released for others connections.
>>
>> What am I doing wrong ? Can someone give me a hint or a reference to dig
>> into ?
>>
>> Thanks in advance,
>>
>> Kind regards,
>>
>> Benoit.
>>
>>
>> On 01/15/2011 06:36 PM, Benoit Perroud wrote:
>>> Hi all,
>>>
>>> I'm really new in Netty, and I don't know where to begin to achieve
>>> the following behavior :
>>>
>>> I have connections that should wait on a condition before sending the
>>> response. For example "Hang all the client till a particular request
>>> is done".
>>>
>>> I tried to put the Channel in a ChannelGroup in messageReceived, and
>>> then to have a Runnable waiting on the condition and iterating on the
>>> ChannelGroup when the condition is met.
>>>
>>> I also try to add a threadPool in the pipeline before my handler, but
>>> my tires do not accept more than 2 connections, the other hang on.
>>>
>>> Thanks in advance,
>>>
>>> Kind regards,
>>>
>>> Benoit.
>>>
>> _______________________________________________
>> netty-users mailing list
>> netty-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/netty-users
>>
> _______________________________________________
> 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