Code example for Socket

Methods: close, getInetAddress, getOutputStream, getPort, isConnected