>As inconsistent it may sounds, the class you want to look at is 
>SocketSessionConfig, not inheriting from IoSessionConfig... 
>Don't ask my whay ;)

Bam-- that worked.  I added this to my server setup:
        if (acceptor.getSessionConfig() instanceof SocketSessionConfig) {
            SocketSessionConfig sessionConfig= 
(SocketSessionConfig)acceptor.getSessionConfig();
            sessionConfig.setReceiveBufferSize(64 * 1024);
        }
and it made a huge difference.  Thanks for your suggestion!

I'm curious what the best-practice is for 
setReceiveBufferSize/setSendBufferSize.  The protocol I'm using is mostly small 
messages (<1K), with large messages (~250K) every now and then.  It seems a 
shame to have the buffer be very large for only occasional messages.

Is it possible to modify this setting on the fly (from the IoHandler, for 
example)?  What does the mina FtpServer 
(http://mina.apache.org/ftpserver/documentation.html) do in this regard?



Thanks,
aaron

Reply via email to