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 |
|---|---|
InputStream |
getInputStream() |
OutputStream |
getOutputStream() |
String |
getRemoteAddress() |
boolean |
isConnected() |
disposeboolean isConnected()
InputStream getInputStream()
InputStream used to read data from the other end of the connection.OutputStream getOutputStream()
OutputStream used to write data to the other end of the connection.String getRemoteAddress()
Copyright © 2021. All rights reserved.