Code example for Socket

Methods: close, isConnected, shutdownInput, shutdownOutput