Newbie questions

Iain McGinniss iainmcgin at gmail.com
Tue Aug 18 05:46:18 EDT 2009


Hi Bozo,

I'll take a quick stab at this. I've attached something like what  
you're looking for, but beware: I've not tested this, I've just  
written it based on my current understanding of netty. Would be useful  
to have it reviewed by others in the community to see if it is a  
sensible pattern. The alternative would be to use a  
WriteTimeoutHandler in your pipeline, but I do not think this fits the  
requirements here as it will not trigger an exception if writes are  
being continuously issued, but never completing (due to a slow  
connection).

Iain

-------------- next part --------------
A non-text attachment was scrubbed...
Name: RequestTimeoutHandler.java
Type: application/octet-stream
Size: 2517 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20090818/c65ac8e0/attachment-0001.obj 
-------------- next part --------------


On 18 Aug 2009, at 10:11, Bozo Juretic wrote:

> ??? (Trustin Lee) wrote:
>> You could use org.jboss.netty.util.HashedWheelTimer and schedule a
>> timeout for each request, cancel the scheduled timeout when a
>> corresponding response is received, and handle the timeout if no
>> response was received.
>>
> Trustin,
>
> first of all thank you for your kind response. Is it possible that you
> give me a small (pseudo)code example or a pointer to existing code to
> see how this can be practically done? I understand the principle,  
> but am
> all too new to netty to do it.
>
> Thank you,
>
> Bozo
> _______________________________________________
> 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