public interface Socket extends Disposable
Net.Protocol. See
Net.newClientSocket(Protocol, String, int, SocketHints) and
Net.newServerSocket(Protocol, int, ServerSocketHints).
A socket has an InputStream used to send data to the other end of the connection, and an OutputStream to
receive data from the other end of the connection.
A socket needs to be disposed if it is no longer used. Disposing also closes the connection.| Modifier and Type | Method and Description |
|---|---|
java.io.InputStream |
getInputStream() |
java.io.OutputStream |
getOutputStream() |
java.lang.String |
getRemoteAddress() |
boolean |
isConnected() |
disposeboolean isConnected()
java.io.InputStream getInputStream()
InputStream used to read data from the other end of the connection.java.io.OutputStream getOutputStream()
OutputStream used to write data to the other end of the connection.java.lang.String getRemoteAddress()