Skip to content

SSH.Channel.WaitClose

Andrew Lambert edited this page Sep 8, 2023 · 9 revisions

SSH.Channel.WaitClose

Method Signature

 Sub WaitClose()

Remarks

Enter a temporary blocking state until one of the following conditions is met:

  • The remote host sent the SSH "channel closed" message, indicating the channel is now closed on its end.
  • The receive buffer is full.
  • An error occurred.

If the "channel closed" message was received then LastError will be zero when this method returns.

If the receive buffer is full then LastError will be LIBSSH2_ERROR_CHANNEL_WINDOW_FULL(-47) when this method returns, in which case you need to Read() from the channel before calling this method again.

Any other value of LastError when this method returns indicates a fatal error.

This method is typically called after calling Close() in order to examine the exit status of the command or program being executed.

See also

Clone this wiki locally