- Mladen Turk
- $Revision: 515 $, $Date: 2008-03-17 22:02:23 +0100 (Mon, 17 Mar 2008) $
Create a socket.
path The address of the new socket.
cont The parent pool to use
- The new socket that has been set up.
Bind the socket to its associated port
sock The socket to bind
sa The socket address to bind to
This may be where we will find out if there is any other process
using the selected port.
public static native int bind(long sock, long sa);
Listen to a bound socket for connections.
sock The socket to listen on
backlog The number of outstanding connections allowed in the sockets
listen queue. If this value is less than zero, for NT pipes
the number of instances is unlimite.
public static native int listen(long sock, int backlog);
Accept a new connection request
sock The socket we are listening on.
pool The pool for the new socket.
- A copy of the socket that is connected to the socket that
made the connection request. This is the socket which should
be used for all future communication.
public static native long accept(long sock)
Issue a connection request to a socket either on the same machine
or a different one.
sock The socket we wish to use for our side of the connection
sa The address of the machine we wish to connect to.
Unused for NT Pipes.
public static native int connect(long sock, long sa);