The Connect method will initiate a connection between
wodSSHTunnel and a remote server. It can be used only if
wodSSHTunnel is not already connected to a server at the
time (in other words, it can be used if State is set to
Disconnected).
If an error occurs whilst connecting, the Connected
event will be fired with ErrorCode
set to the error that occurred. If ErrorCode is set to 0, wodSSHTunnel
successfully connected with the remote server.
Upon connection, wodSSHTunnel may perform an initial
'handshake' with the remote server (it will negotiate
encryption algorithms and other properties relating to a
secured connection.) If you see your modem lamps flashing
but you have not received the Connected event yet, this is normal. It is because wodSSHTunnel has connected and is transmitting/receiving packets as part of this negotiation. After the
handshake is completed, wodSSHTunnel may also perform automatic
authentication with the server. All of this will happen
internally prior to the Connected event firing!
After the Connected event has fired, you can Start any channel
for which you want to do port forwarding and immediately
after that you can accept connections.