cx.ath.matthew.unix
public class UnixSocket extends Object
| Constructor Summary | |
|---|---|
| UnixSocket()
Create an unconnected socket. | |
| UnixSocket(UnixSocketAddress address)
Create a socket connected to the given address. | |
| UnixSocket(String address)
Create a socket connected to the given address. | |
| Method Summary | |
|---|---|
| void | close()
Closes the connection. |
| void | connect(UnixSocketAddress address)
Connect the socket to this address. |
| void | connect(String address)
Connect the socket to this address. |
| void | finalize() |
| UnixSocketAddress | getAddress()
Returns the address this socket is connected to.
|
| boolean | getBlocking()
Get the blocking mode. |
| InputStream | getInputStream()
Returns an InputStream for reading from the socket. |
| OutputStream | getOutputStream()
Returns an OutputStream for writing to the socket. |
| boolean | getPassCred()
Get the credential passing status. |
| boolean | isClosed()
Check the socket status. |
| boolean | isConnected()
Check the socket status. |
| boolean | isInputShutdown()
Check the socket status. |
| boolean | isOutputShutdown()
Check the socket status. |
| void | setBlocking(boolean enable)
Set the blocking mode. |
| void | setPassCred(boolean enable)
Set the credential passing status. |
| void | setSoTimeout(int timeout)
Set timeout of read requests. |
| void | shutdownInput()
Shuts down the input stream.
|
| void | shutdownOutput()
Shuts down the output stream.
|
Parameters: address The Unix Socket address to connect to
Parameters: address The Unix Socket address to connect to
Parameters: address The Unix Socket address to connect to
Parameters: address The Unix Socket address to connect to
Returns: The UnixSocketAddress the socket is connected to
Returns: true if reads are blocking.
See Also: setBlocking
Returns: An InputStream connected to this socket.
Returns: An OutputStream connected to this socket.
Returns: The current status of credential passing.
See Also: setPassCred
Returns: true if closed.
Returns: true if connected.
Returns: true if the input stream has been shutdown
Returns: true if the output stream has been shutdown
Parameters: enable Set to false for non-blocking reads.
Parameters: enable Set to true for credentials to be passed.