Skip to content

SSH.Channel.Poll

Andrew Lambert edited this page Nov 26, 2022 · 10 revisions

SSH.Channel.Poll

Method Signature

 Function Poll(Timeout As Integer = 1000, EventMask As Integer = -1) 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 channel before the timeout elapsed.

Remarks

Polls the stream(s) indicated by the EventMask. If this method returns True then Channel.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.

This method will raise the DataAvailable(), Disconnected(), and Error() events (or combinations thereof) as appropriate.

See also

Clone this wiki locally