Related question below.

On 17 Jun 2010, at 09:24, Emmanuel Lecharny wrote:

> On 6/17/10 9:07 AM, Jens Reimann wrote:
>> I actually have and still am not sure what the cause is.
>> 
>> I have an application that uses plain TCP Client/Server communication and
>> sends a lot of small messages trough a custom Codec which converts it to
>> IoBuffers.
>> 
>> This all works fine on MacOS and Linux but on some (not all) Windows XP
>> machines there is a problem that data that passed through the protocol
>> codec does not get written to the socket.
>> 
> 
> Sounds liek you didn't disabled the Naggle algorithm. You have to set 
> the TcpNoDelay flag by calling the setTcpNoDelay( true ) method.

Would this be the right way to achieve that?

connector.getSessionConfig().setTcpNoDelay(true);

>> Actually I figured out that it has to do with the sockets send buffer
>> size. If Mina hits the sockets send buffer the socket seems not to be
>> triggered when then send buffer has room again. Since we do perform
>> periodical pings in our protocol the socket is triggered from this ping
>> and fills the send buffer again. This causes mina outbound buffer to be
>> slowly flushed to the sockets send buffer.
>> 
> You can also increase the send buffer size to increase the througput, 
> but this has to be done before the connection is initialized.
> 
> 
> -- 
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.nextury.com
> 
> 

Zigor.

Reply via email to