tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r757706 - in /tomcat/trunk/java/org/apache/jk/common: ChannelNioSocket.java ChannelSocket.java MsgAjp.java
Date Tue, 24 Mar 2009 10:35:54 GMT
Author: rjung
Date: Tue Mar 24 10:35:53 2009
New Revision: 757706

URL: http://svn.apache.org/viewvc?rev=757706&view=rev
Log:
Use some existing constants instead of inline numbers
in AJP connectors.

Modified:
    tomcat/trunk/java/org/apache/jk/common/ChannelNioSocket.java
    tomcat/trunk/java/org/apache/jk/common/ChannelSocket.java
    tomcat/trunk/java/org/apache/jk/common/MsgAjp.java

Modified: tomcat/trunk/java/org/apache/jk/common/ChannelNioSocket.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jk/common/ChannelNioSocket.java?rev=757706&r1=757705&r2=757706&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jk/common/ChannelNioSocket.java (original)
+++ tomcat/trunk/java/org/apache/jk/common/ChannelNioSocket.java Tue Mar 24 10:35:53 2009
@@ -100,8 +100,8 @@
     private int socketTimeout = 0;
     private boolean nioIsBroken = false;
     private Selector selector = null;
-    private int bufferSize = 8*1024;
-    private int packetSize = 8*1024;
+    private int bufferSize = AjpConstants.MAX_PACKET_SIZE;
+    private int packetSize = AjpConstants.MAX_PACKET_SIZE;
 
     private long requestCount=0;
     
@@ -154,7 +154,7 @@
     }
 
     public void setBufferSize(int bs) {
-        if(bs > 8*1024) {
+        if(bs > AjpConstants.MAX_PACKET_SIZE) {
             bufferSize = bs;
         }
     }
@@ -164,8 +164,8 @@
     }
 
     public void setPacketSize(int ps) {
-        if(ps < 8*1024) {
-            ps = 8*1024;
+        if(ps < AjpConstants.MAX_PACKET_SIZE) {
+            ps = AjpConstants.MAX_PACKET_SIZE;
         }
         packetSize = ps;
     }

Modified: tomcat/trunk/java/org/apache/jk/common/ChannelSocket.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jk/common/ChannelSocket.java?rev=757706&r1=757705&r2=757706&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jk/common/ChannelSocket.java (original)
+++ tomcat/trunk/java/org/apache/jk/common/ChannelSocket.java Tue Mar 24 10:35:53 2009
@@ -89,7 +89,7 @@
     private int linger=100;
     private int socketTimeout;
     private int bufferSize = -1;
-    private int packetSize = 8*1024;
+    private int packetSize = AjpConstants.MAX_PACKET_SIZE;
 
     private long requestCount=0;
     
@@ -208,8 +208,8 @@
     }
 
     public void setPacketSize(int ps) {
-        if(ps < 8*1024) {
-            ps = 8*1024;
+        if(ps < AjpConstants.MAX_PACKET_SIZE) {
+            ps = AjpConstants.MAX_PACKET_SIZE;
         }
         packetSize = ps;
     }

Modified: tomcat/trunk/java/org/apache/jk/common/MsgAjp.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jk/common/MsgAjp.java?rev=757706&r1=757705&r2=757706&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jk/common/MsgAjp.java (original)
+++ tomcat/trunk/java/org/apache/jk/common/MsgAjp.java Tue Mar 24 10:35:53 2009
@@ -63,8 +63,8 @@
      * Constructor that takes a buffer size
      */
     public MsgAjp(int bsize) {
-        if(bsize < 8*1024) {
-            bsize = 8*1024;
+        if(bsize < AjpConstants.MAX_PACKET_SIZE) {
+            bsize = AjpConstants.MAX_PACKET_SIZE;
         }
         bufsize = bsize;
         buf = new byte[bsize];
@@ -76,7 +76,7 @@
      * @deprecated Use the buffer size constructor.
      */
     public MsgAjp() {
-        this(8*1024);
+        this(AjpConstants.MAX_PACKET_SIZE);
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message