public void close(){
  ReadThread t=thread;
  if (t != null)   t.closing=true;
  close(new ServiceResultException(Bad_CommunicationError,"Socket closed by the user"));
}

public void close ( ) { ReadThread t = thread ; if ( t != null ) t . closing = true ; close ( new ServiceResultException ( Bad_CommunicationError , "Socket closed by the user" ) ) ; }
close the socket connection . this method does not request closesecurechannel . does nothing if it is already closed or was never opened . this method is invoked by the user and internally by read thread .
