Interesting.  Is there a way to override this behavior?  For example, with DNS 
you will often receive messages that are 512 bytes or less.  But you would 
always want the buffer to be ready to accept at least 512 bytes.  With DNS 
extensions messages of 2048 bytes or more can be sent/received.

Rob

----- Original Message ----
From: Trustin Lee <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, October 12, 2007 6:24:09 AM
Subject: Re: ByteBuffer capacity shrinks with every new connection

On 10/12/07, pingvishal <[EMAIL PROTECTED]> wrote:
>
> Hello All,
>
> am facing this strange issue of the socket's receiving Bytebuffer capacity
> reducing into half (start from 4096) with every new connection ..
> i have a SocketConnector and am using a ProtocolCodec (tried using a
> CumulativeProtocolDecoder but with same result).
> what am i missing and Is there any way i can handle this in my program ?

With every new connection?  You mean with every new message?  If it
decreases for every new connection, it's a bug.  However, if it's for
every new message received, it's a normal behavior.  MINA
automatically adjusts the buffer capacity per read, and the capacity
will decrease to the half if the amount of bytes received is too
small.  Please clarify if it's for every new connection or message.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6





       
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.
http://farechase.yahoo.com/

Reply via email to