directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r416849 - /directory/branches/apacheds/optimization/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
Date Sat, 24 Jun 2006 00:52:55 GMT
Author: elecharny
Date: Fri Jun 23 17:52:55 2006
New Revision: 416849

URL: http://svn.apache.org/viewvc?rev=416849&view=rev
Log:
Disabling the nagle algorithm to avoid a 40 ms latency between each request

Modified:
    directory/branches/apacheds/optimization/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java

Modified: directory/branches/apacheds/optimization/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java?rev=416849&r1=416848&r2=416849&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
(original)
+++ directory/branches/apacheds/optimization/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
Fri Jun 23 17:52:55 2006
@@ -63,6 +63,7 @@
 import org.apache.mina.transport.socket.nio.DatagramAcceptor;
 import org.apache.mina.transport.socket.nio.SocketAcceptor;
 import org.apache.mina.transport.socket.nio.SocketAcceptorConfig;
+import org.apache.mina.transport.socket.nio.SocketSessionConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -456,7 +457,8 @@
             acceptorCfg.setDisconnectOnUnbind( false );
             acceptorCfg.setReuseAddress( true );
             acceptorCfg.setFilterChainBuilder( chainBuilder );
-
+            ((SocketSessionConfig)(acceptorCfg.getSessionConfig())).setTcpNoDelay( true );
+            
             tcpAcceptor.bind( new InetSocketAddress( port ), protocolProvider.getHandler(),
acceptorCfg );
 
             if ( log.isInfoEnabled() )



Mime
View raw message