Author: fhanik Date: Tue Apr 4 06:53:31 2006 New Revision: 391312 URL: http://svn.apache.org/viewcvs?rev=391312&view=rev Log: More defaults and socket values
Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/AbstractSender.java tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/ReceiverBase.java tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/bio/BioReceiver.java tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/bio/BioSender.java tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReceiver.java tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioSender.java Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/AbstractSender.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/AbstractSender.java?rev=391312&r1=391311&r2=391312&view=diff ============================================================================== --- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/AbstractSender.java (original) +++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/AbstractSender.java Tue Apr 4 06:53:31 2006 @@ -51,11 +51,12 @@ private int maxRetryAttempts = 2;//zero resends private int attempt; private boolean tcpNoDelay = true; - private boolean soKeepAlive; - private boolean ooBInline; - private boolean soReuseAddress; - private boolean soLingerOn; - private int soLingerTime; + private boolean soKeepAlive = false; + private boolean ooBInline = true; + private boolean soReuseAddress = true; + private boolean soLingerOn = true; + private int soLingerTime = 3; + private int soTrafficClass = 0x04 | 0x08 | 0x010; public AbstractSender() { } @@ -191,6 +192,10 @@ return soLingerTime; } + public int getSoTrafficClass() { + return soTrafficClass; + } + public void setKeepAliveCount(int keepAliveCount) { this.keepAliveCount = keepAliveCount; } @@ -249,5 +254,9 @@ public void setSoLingerTime(int soLingerTime) { this.soLingerTime = soLingerTime; + } + + public void setSoTrafficClass(int soTrafficClass) { + this.soTrafficClass = soTrafficClass; } } Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/ReceiverBase.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/ReceiverBase.java?rev=391312&r1=391311&r2=391312&view=diff ============================================================================== --- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/ReceiverBase.java (original) +++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/ReceiverBase.java Tue Apr 4 06:53:31 2006 @@ -59,12 +59,14 @@ private int autoBind = 10; private int maxThreads = 25; private int minThreads = 6; - private boolean tcpNoDelay; - private boolean soKeepAlive; - private boolean ooBInline; - private boolean soResuseAddress; - private boolean soLingerOn; - private int soLingerTime; + private boolean tcpNoDelay = true; + private boolean soKeepAlive = false; + private boolean ooBInline = true; + private boolean soReuseAddress = true; + private boolean soLingerOn = true; + private int soLingerTime = 3; + private int soTrafficClass = 0x04 | 0x08 | 0x010; + public ReceiverBase() { } @@ -265,9 +267,6 @@ return ooBInline; } - public boolean getSoResuseAddress() { - return soResuseAddress; - } public boolean getSoLingerOn() { return soLingerOn; @@ -277,6 +276,14 @@ return soLingerTime; } + public boolean getSoReuseAddress() { + return soReuseAddress; + } + + public int getSoTrafficClass() { + return soTrafficClass; + } + public void setTcpSelectorTimeout(long selTimeout) { tcpSelectorTimeout = selTimeout; } @@ -330,9 +337,6 @@ this.ooBInline = ooBInline; } - public void setSoResuseAddress(boolean soResuseAddress) { - this.soResuseAddress = soResuseAddress; - } public void setSoLingerOn(boolean soLingerOn) { this.soLingerOn = soLingerOn; @@ -340,5 +344,13 @@ public void setSoLingerTime(int soLingerTime) { this.soLingerTime = soLingerTime; + } + + public void setSoReuseAddress(boolean soReuseAddress) { + this.soReuseAddress = soReuseAddress; + } + + public void setSoTrafficClass(int soTrafficClass) { + this.soTrafficClass = soTrafficClass; } } Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/bio/BioReceiver.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/bio/BioReceiver.java?rev=391312&r1=391311&r2=391312&view=diff ============================================================================== --- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/bio/BioReceiver.java (original) +++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/bio/BioReceiver.java Tue Apr 4 06:53:31 2006 @@ -143,8 +143,9 @@ socket.setTcpNoDelay(getTcpNoDelay()); socket.setKeepAlive(getSoKeepAlive()); socket.setOOBInline(getOoBInline()); - socket.setReuseAddress(getSoResuseAddress()); + socket.setReuseAddress(getSoReuseAddress()); socket.setSoLinger(getSoLingerOn(),getSoLingerTime()); + socket.setTrafficClass(getSoTrafficClass()); ObjectReader reader = new ObjectReader(socket); thread.serviceSocket(socket,reader); }//while Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/bio/BioSender.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/bio/BioSender.java?rev=391312&r1=391311&r2=391312&view=diff ============================================================================== --- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/bio/BioSender.java (original) +++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/bio/BioSender.java Tue Apr 4 06:53:31 2006 @@ -191,6 +191,7 @@ socket.setReuseAddress(getSoReuseAddress()); socket.setOOBInline(getOoBInline()); socket.setSoLinger(getSoLingerOn(),getSoLingerTime()); + socket.setTrafficClass(getSoTrafficClass()); setConnected(true); soOut = socket.getOutputStream(); soIn = socket.getInputStream(); Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReceiver.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReceiver.java?rev=391312&r1=391311&r2=391312&view=diff ============================================================================== --- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReceiver.java (original) +++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReceiver.java Tue Apr 4 06:53:31 2006 @@ -175,8 +175,9 @@ channel.socket().setTcpNoDelay(getTcpNoDelay()); channel.socket().setKeepAlive(getSoKeepAlive()); channel.socket().setOOBInline(getOoBInline()); - channel.socket().setReuseAddress(getSoResuseAddress()); + channel.socket().setReuseAddress(getSoReuseAddress()); channel.socket().setSoLinger(getSoLingerOn(),getSoLingerTime()); + channel.socket().setTrafficClass(getSoTrafficClass()); Object attach = new ObjectReader(channel); registerChannel(selector, channel, Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioSender.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioSender.java?rev=391312&r1=391311&r2=391312&view=diff ============================================================================== --- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioSender.java (original) +++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioSender.java Tue Apr 4 06:53:31 2006 @@ -100,6 +100,7 @@ socketChannel.socket().setReuseAddress(getSoReuseAddress()); socketChannel.socket().setOOBInline(getOoBInline()); socketChannel.socket().setSoLinger(getSoLingerOn(),getSoLingerTime()); + socketChannel.socket().setTrafficClass(getSoTrafficClass()); if ( current != null ) key.interestOps(key.interestOps() | SelectionKey.OP_WRITE); return false; } else { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]