Methods Summary |
---|
public static native long | accept(long sock)Accept a new connection request
|
public static native int | acceptfilter(long sock, java.lang.String name, java.lang.String args)Set an OS level accept filter.
|
public static native boolean | atmark(long sock)Query the specified socket if at the OOB/Urgent data mark
|
public static native int | bind(long sock, long sa)Bind the socket to its associated port
|
public static native int | close(long thesocket)Close a socket.
|
public static native int | connect(long sock, long sa)Issue a connection request to a socket either on the same machine
or a different one.
|
public static native long | create(int family, int type, int protocol, long cont)Create a socket.
|
public static native void | destroy(long thesocket)Destroy a pool associated with socket
|
private static native long | get(long socket, int what)Private method for geting the socket struct members
|
public static native int | listen(long sock, int backlog)Listen to a bound socket for connections.
|
public static native int | optGet(long sock, int opt)Query socket options for the specified socket
|
public static native int | optSet(long sock, int opt, int on)Setup socket options for the specified socket
|
public static native long | pool(long thesocket)Create a child pool from associated socket pool.
|
public static native int | recv(long sock, byte[] buf, int offset, int nbytes)Read data from a network.
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.
|
public static native int | recvFrom(long from, long sock, int flags, byte[] buf, int offset, int nbytes)
|
public static native int | recvb(long sock, java.nio.ByteBuffer buf, int offset, int nbytes)Read data from a network.
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.
|
public static native int | recvbb(long sock, int offset, int nbytes)Read data from a network using internally set ByteBuffer
|
public static native int | recvbbt(long sock, int offset, int nbytes, long timeout)Read data from a network with timeout using internally set ByteBuffer
|
public static native int | recvbt(long sock, java.nio.ByteBuffer buf, int offset, int nbytes, long timeout)Read data from a network with timeout.
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.
|
public static native int | recvt(long sock, byte[] buf, int offset, int nbytes, long timeout)Read data from a network with timeout.
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.
|
public static native int | send(long sock, byte[] buf, int offset, int len)Send data over a network.
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.
|
public static native int | sendb(long sock, java.nio.ByteBuffer buf, int offset, int len)Send data over a network.
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.
|
public static native int | sendbb(long sock, int offset, int len)Send data over a network using internally set ByteBuffer
|
public static native long | sendfile(long sock, long file, byte[][] headers, byte[][] trailers, long offset, long len, int flags)Send a file from an open file descriptor to a socket, along with
optional headers and trailers.
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 the len parameter.
The offset parameter is passed by reference for no reason; its
value will never be modified by the apr_socket_sendfile() function.
|
public static native long | sendfilen(long sock, long file, long offset, long len, int flags)Send a file without header and trailer arrays.
|
public static native int | sendto(long sock, long where, int flags, byte[] buf, int offset, int len)
|
public static native int | sendv(long sock, byte[][] vec)Send multiple packets of data over a network.
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.
|
public static native void | setrbb(long sock, java.nio.ByteBuffer buf)Set internal receive ByteBuffer.
This function will preset internal Java ByteBuffer for
consecutive revcvbb/recvbbt calls.
|
public static native void | setsbb(long sock, java.nio.ByteBuffer buf)Set internal send ByteBuffer.
This function will preset internal Java ByteBuffer for
consecutive sendbb calls.
|
public static native int | shutdown(long thesocket, int how)Shutdown either reading, writing, or both sides of a socket.
This does not actually close the socket descriptor, it just
controls which calls are still valid on the socket.
|
public static native long | timeoutGet(long sock)Query socket timeout for the specified socket
|
public static native int | timeoutSet(long sock, long t)Setup socket timeout for the specified socket
|