activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r436745 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
Date Fri, 25 Aug 2006 10:11:37 GMT
Author: jstrachan
Date: Fri Aug 25 03:11:33 2006
New Revision: 436745

URL: http://svn.apache.org/viewvc?rev=436745&view=rev
Log:
allow the TCP_NODELAY option to be configured

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java?rev=436745&r1=436744&r2=436745&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
Fri Aug 25 03:11:33 2006
@@ -65,6 +65,7 @@
     protected boolean useLocalHost = true;
     protected int minmumWireFormatVersion;
     private Boolean keepAlive;
+    private Boolean tcpNoDelay;
 
     /**
      * Connect to a remote Node - e.g. a Broker
@@ -219,6 +220,17 @@
         this.keepAlive = keepAlive;
     }
 
+    public Boolean getTcpNoDelay() {
+        return tcpNoDelay;
+    }
+
+    /**
+     * Enable/disable the TCP_NODELAY option on the socket
+     */
+    public void setTcpNoDelay(Boolean tcpNoDelay) {
+        this.tcpNoDelay = tcpNoDelay;
+    }
+
 
     // Implementation methods
     // -------------------------------------------------------------------------
@@ -251,6 +263,9 @@
         
         if (keepAlive != null) {
             sock.setKeepAlive(keepAlive.booleanValue());
+        }
+        if (tcpNoDelay != null) {
+            sock.setTcpNoDelay(tcpNoDelay.booleanValue());
         }
     }
 



Mime
View raw message