Timeouts without 3.1

"이희승 (Trustin Lee)" trustin at gmail.com
Fri Jun 19 16:01:13 EDT 2009


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/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20090620/a407f491/attachment.bin 


More information about the netty-users mailing list