james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pgoldst...@apache.org
Subject cvs commit: jakarta-james/src/java/org/apache/james/pop3server POP3Handler.java
Date Tue, 12 Nov 2002 17:27:33 GMT
pgoldstein    2002/11/12 09:27:33

  Modified:    src/java/org/apache/james/pop3server POP3Handler.java
  Log:
  POP3 Performance/Functionality fix.
  Added a BufferedOutputStream wrapper to the socket OutputStream.
  Addresses certain platform specific performance/functionality issues.
  Approved by committer vote.
  
  Revision  Changes    Path
  1.18      +4 -4      jakarta-james/src/java/org/apache/james/pop3server/POP3Handler.java
  
  Index: POP3Handler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/pop3server/POP3Handler.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- POP3Handler.java	2 Nov 2002 09:03:52 -0000	1.17
  +++ POP3Handler.java	12 Nov 2002 17:27:33 -0000	1.18
  @@ -238,7 +238,7 @@
           }
   
           try {
  -            outs = socket.getOutputStream();
  +            outs = new BufferedOutputStream(socket.getOutputStream(), 1024);
               out = new InternetPrintWriter(outs, true);
               state = AUTHENTICATION_READY;
               user = "unknown";
  @@ -846,8 +846,6 @@
                   writeLoggedFlushedResponse(responseString);
                   return;
               }
  -            //?May be written as
  -            //return parseCommand("TOP " + num + " " + Integer.MAX_VALUE);?
               try {
                   MailImpl mc = (MailImpl) userMailbox.elementAt(num);
                   if (mc != DELETED) {
  @@ -859,6 +857,8 @@
                                                                 theWatchdog,
                                                                 theConfigData.getResetLength());
                       mc.writeMessageTo(nouts);
  +                    nouts.flush();
  +                    // TODO: Is this an extra CRLF?
                       out.println();
                       out.println(".");
                       out.flush();
  @@ -888,7 +888,6 @@
                   responseString = responseBuffer.toString();
                   writeLoggedFlushedResponse(responseString);
               }
  -            // -------------------------------------------?
           } else {
               responseString = ERR_RESPONSE;
               writeLoggedFlushedResponse(responseString);
  @@ -935,6 +934,7 @@
                                                                 theWatchdog,
                                                                 theConfigData.getResetLength());
                       mc.writeContentTo(nouts, lines);
  +                    nouts.flush();
                       out.println(".");
                       out.flush();
                   } else {
  
  
  

--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>


Mime
View raw message