close method

void close()

Implementation

void close() {
  printDebug?.call('SSHTransport.close');
  if (isClosed) return;
  _socketSubscription?.cancel();
  _socketSubscription = null;
  _doneCompleter.complete();
  socket.destroy();
}