mturk       2005/04/16 07:53:36

  Modified:    jni/java/org/apache/tomcat/jni Socket.java
               jni/native/src network.c
  Log:
  Add atmark function for querying OOB socket data.
  
  Revision  Changes    Path
  1.9       +17 -9     
jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/Socket.java
  
  Index: Socket.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/Socket.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Socket.java       16 Apr 2005 14:47:20 -0000      1.8
  +++ Socket.java       16 Apr 2005 14:53:36 -0000      1.9
  @@ -161,6 +161,14 @@
           throws Exception;
   
       /**
  +     * Query the specified socket if at the OOB/Urgent data mark
  +     * @param sock The socket to query
  +     * @return True if socket is at the OOB/urgent mark,
  +     *         otherwise return false.
  +     */
  +    public static native boolean atmark(long sock);
  +
  +    /**
        * Issue a connection request to a socket either on the same machine
        * or a different one.
        * @param sock The socket we wish to use for our side of the connection
  @@ -184,7 +192,7 @@
        * @param offset Offset in the byte buffer.
        * @param len The number of bytes to write; (-1) for full array.
        * @return The number of bytes send.
  -     * 
  +     *
        */
       public static native int send(long sock, byte[] buf, int offset, int 
len);
   
  @@ -205,9 +213,9 @@
        *               which bytes are to be retrieved; must be non-negative
        *               and no larger than buf.length
        * @param len The maximum number of buffers to be accessed; must be 
non-negative
  -     *            and no larger than buf.length - offset 
  +     *            and no larger than buf.length - offset
        * @return The number of bytes send.
  -     * 
  +     *
        */
       public static native int sendb(long sock, ByteBuffer buf,
                                      int offset, int len);
  @@ -226,7 +234,7 @@
        * </PRE>
        * @param sock The socket to send the data over.
        * @param vec The array from which to get the data to send.
  -     * 
  +     *
        */
       public static native int sendv(long sock, byte[][] vec);
   
  @@ -243,7 +251,7 @@
   
       /**
        * Read data from a network.
  -     * 
  +     *
        * <PRE>
        * This functions acts like a blocking read by default.  To change
        * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
  @@ -265,7 +273,7 @@
   
       /**
        * Read data from a network with timeout.
  -     * 
  +     *
        * <PRE>
        * This functions acts like a blocking read by default.  To change
        * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
  @@ -289,7 +297,7 @@
   
       /**
        * Read data from a network.
  -     * 
  +     *
        * <PRE>
        * This functions acts like a blocking read by default.  To change
        * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
  @@ -312,7 +320,7 @@
   
       /**
        * Read data from a network with timeout.
  -     * 
  +     *
        * <PRE>
        * This functions acts like a blocking read by default.  To change
        * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
  
  
  
  1.9       +1 -1      jakarta-tomcat-connectors/jni/native/src/network.c
  
  Index: network.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/network.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- network.c 16 Apr 2005 14:47:20 -0000      1.8
  +++ network.c 16 Apr 2005 14:53:36 -0000      1.9
  @@ -462,7 +462,7 @@
       return (jlong)timeout;
   }
   
  -TCN_IMPLEMENT_CALL(jint, Socket, atmark)(TCN_STDARGS, jlong sock)
  +TCN_IMPLEMENT_CALL(jboolean, Socket, atmark)(TCN_STDARGS, jlong sock)
   {
       apr_socket_t *s = J2P(sock, apr_socket_t *);
       apr_int32_t mark;
  
  
  

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

Reply via email to