Timeouts without 3.1

infectedrhythms voodoo at videotron.ca
Mon Jun 22 09:42:06 EDT 2009


Ok thanks. What would happen if say my handler does not get the required
amount of bytes it needs to read from the client?



Trustin Lee wrote:
> 
> You could backport the ReadTimeoutHandler somehow, but it is recommended
> to upgrade to 3.1.CR1 (release candidate) as it is pretty stable IMHO.
> 
> 3.1.0.GA will be released in less than 3 weeks. :)
> 
> On 2009-06-20 오전 6:00, infectedrhythms wrote:
>> 
>> There's no other way but to upgrade to 3.1?
>> 
>> 
>> infectedrhythms wrote:
>>>
>>> I can't use none GA software. When is 3.1 expected to be out?
>>>
>>> And is there a solution for 3.0?
>>>
>>>
>>> Trustin Lee wrote:
>>>>
>>>> Perhaps you could try ReadTimeoutHandler in
>>>> org.jboss.netty.handler.timeout?  Please note
>>>> ChannelConfig.writeTimeoutMillis has been deprecated and you should use
>>>> WriteTimeoutHandler.
>>>>
>>>> HTH,
>>>> Trustin
>>>>
>>>> On 2009-06-20 오전 4:53, infectedrhythms wrote:
>>>>>
>>>>> So far I see a writeTimeoutMillis in the ChannelConfig docs.
>>>>>
>>>>>
>>>>> How do I go about timeout a client that did not send all the bytes in
>>>>> time
>>>>> to the server?
>>>>>
>>>>> What happens if the client doesn't send all the bytes to complete the
>>>>> message and how should it be handled on the server?
>>>>>
>>>>> public class MyHeaderFrameDecoder extends FrameDecoder {
>>>>>
>>>>> 	protected Object decode(ChannelHandlerContext ctx, Channel channel,
>>>>> ChannelBuffer buf) throws Exception {
>>>>>
>>>>> 		// Make sure if the length field was received.
>>>>> 		if(buf.readableBytes() < headerSize) {
>>>>> 			return null;
>>>>> 		}
>>>>> ...
>>>>>
>>>>> We have a header now read for the message...
>>>>>
>>>>> }
>>>>
>>>>
>>>> -- 
>>>> — Trustin Lee, http://gleamynode.net/
>>>>
>>>>
>>>>  
>>>> _______________________________________________
>>>> netty-users mailing list
>>>> netty-users at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/netty-users
>>>>
>>>>
>>>
>>>
>> 
> 
> 
> -- 
> — Trustin Lee, http://gleamynode.net/
> 
> 
>  
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
> 
> 

-- 
View this message in context: http://n2.nabble.com/Timeouts-without-3.1-tp3121799p3136279.html
Sent from the Netty User Group mailing list archive at Nabble.com.





More information about the netty-users mailing list