cvs commit: jakarta-tomcat-connectors/jk/native2/tomcat UnixSocket.c

2002-03-27 Thread costin

costin  02/03/27 16:10:30

  Removed: jk/native2/tomcat UnixSocket.c
  Log:
  Confusing - this file was not used ( the actual impl. is part of
  jni/ dir )

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: cvs commit: jakarta-tomcat-connectors/jk/native2/tomcat UnixSocket.c

2002-01-10 Thread jean-frederic clere

[EMAIL PROTECTED] wrote:
 
 I've also wrote the unix socket code, in the jni directory.

APR is going to support unix sockets. So I will wait a little before going on
;-))

 
 I'll check in my version too, and try a merge later ( I've also got the
 jkservlet working with both 3.3 and 4.0, things look pretty good )
 
 Costin
 
 On 5 Jan 2002 [EMAIL PROTECTED] wrote:
 
  jfclere 02/01/05 02:03:43
 
Modified:jk/java/org/apache/jk/server JkMain.java
 jk/native2 build.xml
Added:   jk/java/org/apache/jk/common ChannelUnixSocket.java
 jk/native2/tomcat UnixSocket.c
Log:
Add code for AF_UNIX sockets.
 
Revision  ChangesPath
1.1  
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelUnixSocket.java
 
Index: ChannelUnixSocket.java
===
/*
 * 
 *
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 1999 The Apache Software Foundation.  All rights
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *notice, this list of conditions and the following disclaimer in
 *the documentation and/or other materials provided with the
 *distribution.
 *
 * 3. The end-user documentation included with the redistribution, if
 *any, must include the following acknowlegement:
 *   This product includes software developed by the
 *Apache Software Foundation (http://www.apache.org/).
 *Alternately, this acknowlegement may appear in the software itself,
 *if and wherever such third-party acknowlegements normally appear.
 *
 * 4. The names The Jakarta Project, Tomcat, and Apache Software
 *Foundation must not be used to endorse or promote products derived
 *from this software without prior written permission. For written
 *permission, please contact [EMAIL PROTECTED]
 *
 * 5. Products derived from this software may not be called Apache
 *nor may Apache appear in their names without prior written
 *permission of the Apache Group.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * 
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the Apache Software Foundation.  For more
 * information on the Apache Software Foundation, please see
 * http://www.apache.org/.
 *
 * [Additional notices, if required by prior licensing conditions]
 *
 */
 
package org.apache.jk.common;
 
import java.io.*;
 
import java.net.*;
import java.util.*;
 
import org.apache.tomcat.util.buf.*;
import org.apache.tomcat.util.http.*;
 
import org.apache.tomcat.util.threads.*;
 
import org.apache.jk.core.*;
 
 
/* XXX Make the 'message type' pluggable
 */
 
/* A lot of the 'original' behavior is hardcoded - this uses Ajp13 wire protocol,
   TCP, Ajp14 API etc.
   As we add other protocols/transports/APIs this will change, the current goal
   is to get the same level of functionality as in the original jk connector.
*/
 
/**
 *  Jk2 can use multiple protocols/transports.
 *  Various container adapters should load this object ( as a bean ),
 *  set configurations and use it. Note that the connector will handle
 *  all incoming protocols - it's not specific to ajp1x. The protocol
 *  is abstracted by Endpoint/Message/Channel.
 */
 
 
/** Accept ( and send ) messages via Unix Socket (AF_UNIX).
 * The AF_UNIX is not supported by JAVA so we need a piece of native code.
 *
 * @author Costin Manolache
 

cvs commit: jakarta-tomcat-connectors/jk/native2/tomcat UnixSocket.c

2002-01-05 Thread jfclere

jfclere 02/01/05 02:03:43

  Modified:jk/java/org/apache/jk/server JkMain.java
   jk/native2 build.xml
  Added:   jk/java/org/apache/jk/common ChannelUnixSocket.java
   jk/native2/tomcat UnixSocket.c
  Log:
  Add code for AF_UNIX sockets.
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelUnixSocket.java
  
  Index: ChannelUnixSocket.java
  ===
  /*
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Tomcat, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */
  
  package org.apache.jk.common;
  
  import java.io.*;
  
  import java.net.*;
  import java.util.*;
  
  import org.apache.tomcat.util.buf.*;
  import org.apache.tomcat.util.http.*;
  
  import org.apache.tomcat.util.threads.*;
  
  import org.apache.jk.core.*;
  
  
  /* XXX Make the 'message type' pluggable
   */
  
  /* A lot of the 'original' behavior is hardcoded - this uses Ajp13 wire protocol,
 TCP, Ajp14 API etc.
 As we add other protocols/transports/APIs this will change, the current goal
 is to get the same level of functionality as in the original jk connector.
  */
  
  /**
   *  Jk2 can use multiple protocols/transports.
   *  Various container adapters should load this object ( as a bean ),
   *  set configurations and use it. Note that the connector will handle
   *  all incoming protocols - it's not specific to ajp1x. The protocol
   *  is abstracted by Endpoint/Message/Channel.
   */
  
  
  /** Accept ( and send ) messages via Unix Socket (AF_UNIX).
   * The AF_UNIX is not supported by JAVA so we need a piece of native code.
   *
   * @author Costin Manolache
   * @author Jean-Frederic Clere (Well, I have copied Costin's code and ideas).
   */
  public class ChannelUnixSocket extends Channel {
  
  /* XXX do not have port/Address */
  // int port;
  // InetAddress inet;
  int serverTimeout;
  boolean tcpNoDelay;
  int linger=100;
  int socketTimeout;
  
  Worker worker;
  
  ThreadPool tp=new ThreadPool();
  
  /*  socket options  */
  
  public ThreadPool getThreadPool() {
  return tp;
  }
  
  

Re: cvs commit: jakarta-tomcat-connectors/jk/native2/tomcat UnixSocket.c

2002-01-05 Thread cmanolache

I've also wrote the unix socket code, in the jni directory.

I'll check in my version too, and try a merge later ( I've also got the
jkservlet working with both 3.3 and 4.0, things look pretty good )


Costin


On 5 Jan 2002 [EMAIL PROTECTED] wrote:

 jfclere 02/01/05 02:03:43

   Modified:jk/java/org/apache/jk/server JkMain.java
jk/native2 build.xml
   Added:   jk/java/org/apache/jk/common ChannelUnixSocket.java
jk/native2/tomcat UnixSocket.c
   Log:
   Add code for AF_UNIX sockets.

   Revision  ChangesPath
   1.1  
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelUnixSocket.java

   Index: ChannelUnixSocket.java
   ===
   /*
* 
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
*notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
*notice, this list of conditions and the following disclaimer in
*the documentation and/or other materials provided with the
*distribution.
*
* 3. The end-user documentation included with the redistribution, if
*any, must include the following acknowlegement:
*   This product includes software developed by the
*Apache Software Foundation (http://www.apache.org/).
*Alternately, this acknowlegement may appear in the software itself,
*if and wherever such third-party acknowlegements normally appear.
*
* 4. The names The Jakarta Project, Tomcat, and Apache Software
*Foundation must not be used to endorse or promote products derived
*from this software without prior written permission. For written
*permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called Apache
*nor may Apache appear in their names without prior written
*permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* 
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation.  For more
* information on the Apache Software Foundation, please see
* http://www.apache.org/.
*
* [Additional notices, if required by prior licensing conditions]
*
*/

   package org.apache.jk.common;

   import java.io.*;

   import java.net.*;
   import java.util.*;

   import org.apache.tomcat.util.buf.*;
   import org.apache.tomcat.util.http.*;

   import org.apache.tomcat.util.threads.*;

   import org.apache.jk.core.*;


   /* XXX Make the 'message type' pluggable
*/

   /* A lot of the 'original' behavior is hardcoded - this uses Ajp13 wire protocol,
  TCP, Ajp14 API etc.
  As we add other protocols/transports/APIs this will change, the current goal
  is to get the same level of functionality as in the original jk connector.
   */

   /**
*  Jk2 can use multiple protocols/transports.
*  Various container adapters should load this object ( as a bean ),
*  set configurations and use it. Note that the connector will handle
*  all incoming protocols - it's not specific to ajp1x. The protocol
*  is abstracted by Endpoint/Message/Channel.
*/


   /** Accept ( and send ) messages via Unix Socket (AF_UNIX).
* The AF_UNIX is not supported by JAVA so we need a piece of native code.
*
* @author Costin Manolache
* @author Jean-Frederic Clere (Well, I have copied Costin's code and ideas).
*/
   public class ChannelUnixSocket extends Channel {

   /* XXX do not have port/Address */
   // int port;
   // InetAddress inet;