connect method
void
connect(
- Uri address,
- VoidCallback connectCallback,
- StringCallback errorHandler, {
- int timeoutSeconds = 15,
- bool ignoreBadCert = false,
override
Connects to address
over SSH tunnel provided by client.
Implementation
@override
void connect(
Uri address, VoidCallback connectCallback, StringCallback errorHandler,
{int timeoutSeconds = 15, bool ignoreBadCert = false}) {
tunnelToHost = address.host;
tunnelToPort = address.port;
connectHandler = connectCallback;
connectError = errorHandler;
if (clientOwner) {
client.socket.connect(client.hostport, client.onConnected, (error) {
client.disconnect('connect error');
if (connectError != null) connectError(error);
});
} else {
if (client.sessionChannel == null) {
client.success.add(openTunnel);
} else {
openTunnel();
}
}
}