incubator-ftpserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r504657 - /incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/listener/mina/MinaListener.java
Date Wed, 07 Feb 2007 19:34:42 GMT
Author: ngn
Date: Wed Feb  7 11:34:41 2007
New Revision: 504657

URL: http://svn.apache.org/viewvc?view=rev&rev=504657
Log:
Limiting the default buffer pool size in MINA (default is 40k which is far more than we need).

Modified:
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/listener/mina/MinaListener.java

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/listener/mina/MinaListener.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/listener/mina/MinaListener.java?view=diff&rev=504657&r1=504656&r2=504657
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/listener/mina/MinaListener.java
(original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/listener/mina/MinaListener.java
Wed Feb  7 11:34:41 2007
@@ -36,6 +36,7 @@
 import org.apache.mina.filter.codec.ProtocolCodecFilter;
 import org.apache.mina.transport.socket.nio.SocketAcceptor;
 import org.apache.mina.transport.socket.nio.SocketAcceptorConfig;
+import org.apache.mina.transport.socket.nio.SocketSessionConfig;
 
 /**
  * The default {@link Listener} implementation.
@@ -80,12 +81,16 @@
         }
         
         cfg = new SocketAcceptorConfig();
+        
         cfg.setReuseAddress( true );
         cfg.getFilterChain().addLast(
                 "protocolFilter",
                 new ProtocolCodecFilter( new FtpServerProtocolCodecFactory() ) );
         cfg.getFilterChain().addLast( "logger", new LoggingFilter() );
 
+        // Decrease the default receiver buffer size
+        ((SocketSessionConfig) acceptor.getDefaultConfig().getSessionConfig()).setReceiveBufferSize(512);

+        
         if(serverContext.getSocketFactory() instanceof SSLFtpSocketFactory) {
             Ssl ssl = serverContext.getSocketFactory().getSSL();
             try {



Mime
View raw message