Sockets
Additionally, there are several commonly used Socket methods:
public InputStream getInputStream();
Returns an input stream for this socket.
public OutputStream getOutputStream();
Returns an output stream for this socket.
Returns the remote port to which this socket is connected.
public InetAddress getInetAddress();
Returns the address to which the socket is connected.
public int getLocalPort();
Returns the local port to which this socket is bound.
The streams returned from these accessors rely on TCP’s error correction and flow