Skip to content

SSH.TCPListener.StartListening

Andrew Lambert edited this page Feb 27, 2023 · 4 revisions

SSH.TCPListener.StartListening

Method signature

 Sub StartListening()

Remarks

Instruct the SSH server to begin listening on its local network interface(s), identified by RemoteInterface, for inbound connections to RemotePort. If RemoteInterface="" 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 ConnectionReceived() event will be raised. If an error occurs then the Error() event will be raised.

libssh2 will enqueue at most MaxConnections before refusing to accept new ones. Once a connection is passed to the ConnectionReceived() event it is no longer counted against MaxConnections.

Clone this wiki locally