-
-
Notifications
You must be signed in to change notification settings - Fork 4
SSH.TCPTunnel.Listen
Sub Listen()
Instructs the SSH server to begin listening on its local network interface(s), identified by RemoteAddress, for an inbound connection to RemotePort. If RemoteAddress
is the empty string then the server will listen on all of its local interfaces. If RemotePort<=0
then the server will select a random ephemeral port to listen on, and the RemotePort
property will be updated accordingly.
You must periodically call the Poll() method to poll the listener for activity. If a connection is received then the Connected() event will be raised. If an error occurs then the Error() event will be raised. Once connected you may read from and write to the tunnel like any other Channel.
This method listens for exactly one inbound connection and accepts the first one that arrives. To accept more than one inbound connection on the remote port refer to the TCPListener class.
Wiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2018-24 Andrew Lambert, offered under the CC BY-SA 3.0 License.