public void close ( ) { if ( _socket != null ) { try { _socket . close ( ) ; _socket = null ; } catch ( IOException e ) { System . err . println ( "Exception: " + e ) ; // throw new SoccomException(SoccomException.RECV_ERROR); } _in = null ; _out = null ; } }
Close the connection . This is automatically called at garbage collection but it is a good idea to voluntarily call it as soon as the connection is not needed any more .