mina-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: handling a slow client
Date Fri, 22 Nov 2013 21:55:19 GMT
Le 11/22/13 10:00 PM, Binole, Bill a écrit :
> I was wondering how to handle a slow client.  So say my client writes 100 bytes and then
5 seconds later writes another 100 bytes.  What is being sent is delimited with a start and
end block that I am checking for to insure I have a full message.  I have written a decoder
based on the CumulativeProtocolDecoder that works just fine except for the case of a slow
client.  In this case the buffer is drained before the end block is received and it is causing
a bogus error condition.  Is there a way to handle this within the decoder?

There is no way your buffer can be drained if you don't read it in your
decoder, wether the client is slow or not. Just check your decoder, it's
likely to be bogus.

Emmanuel Lécharny

View raw message