Skip to content

SSH.Session.Poll

Andrew Lambert edited this page Jul 24, 2021 · 3 revisions

SSH.Session.Poll

Method Signature

 Function Poll(Timeout As Integer = 1000, EventMask As Integer = 0) As Boolean

Parameters

Name Type Comment
Timeout Integer Optional. If specified, the maximum period of time to wait for activity before returning, in milliseconds.
EventMask Integer Optional. If specified, a bitmask of LIBSSH2_POLLFD_* constants indicating which streams to poll. If not specified then all streams are polled.

Return value

Returns True if there was activity on the socket before the timeout elapsed.

Remarks

Polls the underlying TCP connection for activity. If this method returns True then Session.LastError will contain a bitmask of LIBSSH2_POLLFD_* constants indicating which streams are ready. If it returns False because of an error condition then the LastError will contain the error code, otherwise (that is, no errors and no activity) the LastError will be zero.

See also

Clone this wiki locally