|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--gnu.net.local.AfUnixSocketImpl
Implementation class of AfUnixSocket - links to the native library
| Field Summary | |
int |
native_fd
This is the native file descriptor for this socket |
| Method Summary | |
protected void |
accept(AfUnixSocketImpl impl)
Accepts a new connection on this socket and returns in in the passed in AfUnixSocketImpl. |
protected int |
available()
Returns the number of bytes that the caller can read from this socket without blocking. |
protected void |
bind(java.lang.String sockname)
Binds to the specified socket |
protected void |
close()
Closes the socket. |
protected void |
connect(java.lang.String sockname)
Connects to the socket specified as arguments. |
protected void |
create(boolean stream)
Creates a new socket that is not bound to any local address/port and is not connected to any remote address/port. |
static AfUnixSocketImpl |
createNew()
return new instance loads the native libraray - throws UnsatisfiedLinkError on failure |
protected java.io.InputStream |
getInputStream()
Returns an InputStream object for reading from this socket. |
protected java.lang.Object |
getOption(int option_id)
Returns the current setting of the specified option. |
protected java.io.OutputStream |
getOutputStream()
Returns an OutputStream object for writing to this socket. |
protected void |
listen(int queuelen)
Starts listening for connections on a socket. |
static void |
loadNativeLibrary()
loads the native library. |
protected int |
read(byte[] buf,
int offset,
int len)
Internal method used by SocketInputStream for reading data from the connection. |
protected void |
setOption(int option_id,
java.lang.Object val)
Sets the specified option on a socket to the passed in object. |
protected void |
shutdownInput()
NOT IMPLEMENTED |
protected void |
shutdownOutput()
NOT IMPLEMENTED |
protected void |
write(byte[] buf,
int offset,
int len)
Internal method used by SocketOuputStream for writing data to the connection. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public int native_fd
| Method Detail |
public static void loadNativeLibrary()
public static AfUnixSocketImpl createNew()
protected void accept(AfUnixSocketImpl impl)
throws java.io.IOException
impl - The AfUnixSocketImpl object to accept this connection.
java.io.IOException
protected int available()
throws java.io.IOException
java.io.IOException - If an error occurs
protected void bind(java.lang.String sockname)
throws java.io.IOException
sockname - The socket to bind to
java.io.IOException - If an error occurs
protected void close()
throws java.io.IOException
Note that if the SO_LINGER option is set on this socket, then the operation could block. (not implemented yet)
java.io.IOException - If an error occurs
protected void connect(java.lang.String sockname)
throws java.io.IOException
sockname - The socket to connect to
java.io.IOException - If an error occurs
protected void create(boolean stream)
throws java.io.IOException
stream - true for a stream socket, false for a datagram socket
java.io.IOException
protected void listen(int queuelen)
throws java.io.IOException
queuelen - The length of the pending connection queue
java.io.IOException - If an error occurs
protected int read(byte[] buf,
int offset,
int len)
throws java.io.IOException
java.io.IOException - If an error occurs
protected void write(byte[] buf,
int offset,
int len)
throws java.io.IOException
java.io.IOException - If an error occurs
protected void setOption(int option_id,
java.lang.Object val)
throws java.net.SocketException
NOT IMPLEMENTED
option_id - The identifier of the optionval - The value to set the option to
java.net.SocketException - If an error occurs
protected java.lang.Object getOption(int option_id)
throws java.net.SocketException
NOT IMPLEMENTED
option_id - The option identifier
java.net.SocketException - If an error occurs
protected java.io.InputStream getInputStream()
throws java.io.IOException
java.io.IOException - If an error occurs
protected java.io.OutputStream getOutputStream()
throws java.io.IOException
java.io.IOException - If an error occursprotected void shutdownInput()
protected void shutdownOutput()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||