mturk 2005/06/17 04:22:04 Modified: jni/java/org/apache/tomcat/jni Poll.java SSLSocket.java Log: Update SSL socket functions as pointers to the socket implementation. Revision Changes Path 1.12 +4 -10 jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/Poll.java Index: Poll.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/Poll.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- Poll.java 17 Jun 2005 09:41:30 -0000 1.11 +++ Poll.java 17 Jun 2005 11:22:04 -0000 1.12 @@ -96,13 +96,11 @@ * @param pollset The pollset to use * @param timeout Timeout in microseconds * @param descriptors Array of signalled descriptors (output parameter) - * The desctiptor array must be four times the size of pollset. + * The desctiptor array must be two times the size of pollset. * and are populated as follows: * <PRE> * descriptors[n + 0] -> returned events * descriptors[n + 1] -> socket - * descriptors[n + 2] -> client data - * descriptors[n + 2] -> reserved * </PRE> * @param remove Remove signaled descriptors from pollset * @return Number of signalled descriptors (output parameter) @@ -115,13 +113,11 @@ * Maintain on the descriptor(s) in a pollset * @param pollset The pollset to use * @param descriptors Array of signalled descriptors (output parameter) - * The desctiptor array must be four times the size of pollset. + * The desctiptor array must be two times the size of pollset. * and are populated as follows: * <PRE> * descriptors[n + 0] -> returned events * descriptors[n + 1] -> socket - * descriptors[n + 2] -> client data - * descriptors[n + 2] -> reserved * </PRE> * @param remove Remove signaled descriptors from pollset * @return Number of signalled descriptors (output parameter) @@ -148,13 +144,11 @@ * Return all descriptor(s) in a pollset * @param pollset The pollset to use * @param descriptors Array of descriptors (output parameter) - * The desctiptor array must be four times the size of pollset. + * The desctiptor array must be two times the size of pollset. * and are populated as follows: * <PRE> * descriptors[n + 0] -> returned events * descriptors[n + 1] -> socket - * descriptors[n + 2] -> client data - * descriptors[n + 2] -> reserved * </PRE> * @return Number of descriptors (output parameter) in the Poll * or negative APR error code. 1.13 +2 -191 jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/SSLSocket.java Index: SSLSocket.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/SSLSocket.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- SSLSocket.java 15 Jun 2005 12:08:02 -0000 1.12 +++ SSLSocket.java 17 Jun 2005 11:22:04 -0000 1.13 @@ -40,200 +40,11 @@ /** * Do a SSL handshake. - * @param thesocket The socket to close + * @param thesocket The socket to use */ public static native int handshake(long thesocket); /** - * Shutdown a socket. - * <br /> - * This does not actually close the socket descriptor, it just - * controls which calls are still valid on the socket. - * @param thesocket The socket to close - * @param how How to shutdown the socket. One of: - * <PRE> - * SSL_SHUTDOWN_TYPE_UNSET - * SSL_SHUTDOWN_TYPE_STANDARD - * SSL_SHUTDOWN_TYPE_UNCLEAN - * SSL_SHUTDOWN_TYPE_ACCURATE - * </PRE> - * If SSL_SHUTDOWN_TYPE_UNSET is used the default context shutdown - * type is used. - */ - public static native int shutdown(long thesocket, int how); - - /** - * Close a socket. - * @param thesocket The socket to close - */ - public static native int close(long thesocket); - - /** - * Destroy the socket. - * <br /> - * This function destroys the pool used for <code>attach</code> call. - * The main usage for this function is to allow the SSLSocket to be - * passed as client data to the Poll. - * @param thesocket The socket to destroy - */ - public static native int destroy(long thesocket); - - /** - * Send data over a network. - * <PRE> - * This functions acts like a blocking write by default. To change - * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK - * socket option. - * - * It is possible for both bytes to be sent and an error to be returned. - * - * APR_EINTR is never returned. - * </PRE> - * @param sock The socket to send the data over. - * @param buf The buffer which contains the data to be sent. - * @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); - - /** - * Send data over a network. - * <PRE> - * This functions acts like a blocking write by default. To change - * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK - * socket option. - * - * It is possible for both bytes to be sent and an error to be returned. - * - * APR_EINTR is never returned. - * </PRE> - * @param sock The socket to send the data over. - * @param buf The Byte buffer which contains the data to be sent. - * @param offset The offset within the buffer array of the first buffer from - * 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 - * @return The number of bytes send. - * - */ - public static native int sendb(long sock, ByteBuffer buf, - int offset, int len); - - /** - * Send multiple packets of data over a network. - * <PRE> - * This functions acts like a blocking write by default. To change - * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK - * socket option. - * The number of bytes actually sent is stored in argument 3. - * - * It is possible for both bytes to be sent and an error to be returned. - * - * APR_EINTR is never returned. - * </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); - - /** - * 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 - * socket option. - * The number of bytes actually received is stored in argument 3. - * - * It is possible for both bytes to be received and an APR_EOF or - * other error to be returned. - * - * APR_EINTR is never returned. - * </PRE> - * @param sock The socket to read the data from. - * @param buf The buffer to store the data in. - * @param offset Offset in the byte buffer. - * @param nbytes The number of bytes to read (-1) for full array. - * @return the number of bytes received. - */ - public static native int recv(long sock, byte[] buf, int offset, int nbytes); - - /** - * 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 - * socket option. - * The number of bytes actually received is stored in argument 3. - * - * It is possible for both bytes to be received and an APR_EOF or - * other error to be returned. - * - * APR_EINTR is never returned. - * </PRE> - * @param sock The socket to read the data from. - * @param buf The buffer to store the data in. - * @param offset Offset in the byte buffer. - * @param nbytes The number of bytes to read (-1) for full array. - * @param timeout The socket timeout in microseconds. - * @return the number of bytes received. - */ - public static native int recvt(long sock, byte[] buf, int offset, - int nbytes, long timeout); - - /** - * 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 - * socket option. - * The number of bytes actually received is stored in argument 3. - * - * It is possible for both bytes to be received and an APR_EOF or - * other error to be returned. - * - * APR_EINTR is never returned. - * </PRE> - * @param sock The socket to read the data from. - * @param buf The buffer to store the data in. - * @param offset Offset in the byte buffer. - * @param nbytes The number of bytes to read (-1) for full array. - * @return the number of bytes received. - */ - public static native int recvb(long sock, ByteBuffer buf, - int offset, int nbytes); - - /** - * 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 - * socket option. - * The number of bytes actually received is stored in argument 3. - * - * It is possible for both bytes to be received and an APR_EOF or - * other error to be returned. - * - * APR_EINTR is never returned. - * </PRE> - * @param sock The socket to read the data from. - * @param buf The buffer to store the data in. - * @param offset Offset in the byte buffer. - * @param nbytes The number of bytes to read (-1) for full array. - * @param timeout The socket timeout in microseconds. - * @return the number of bytes received. - */ - public static native int recvbt(long sock, ByteBuffer buf, - int offset, int nbytes, long timeout); - - /** * Retrun SSL Info parameter as byte array. * * @param sock The socket to read the data from.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]