SSHTunneledSocketImpl constructor

SSHTunneledSocketImpl(
  1. Uri url,
  2. String login,
  3. String key,
  4. String password, {
  5. StringCallback print,
  6. StringCallback debugPrint,
})

Implementation

SSHTunneledSocketImpl(Uri url, String login, String key, String password,
    {StringCallback print, StringCallback debugPrint})
    : clientOwner = true {
  identity = key == null ? null : parsePem(key);
  client = SSHClient(
      socketInput: SocketImpl(),
      hostport: url,
      login: login,
      getPassword: password == null ? null : () => utf8.encode(password),
      loadIdentity: () => identity,
      response: (_, m) {},
      disconnected: () {
        if (onDone != null) {
          onDone('SSHTunnelledSocketImpl.client disconnected');
        }
      },
      startShell: false,
      success: openTunnel,
      print: print,
      debugPrint: debugPrint);
}