ClientSessionChannel - SetCloseHandler, OnChannelClose

[C]

__cdecl FlowSshC_ClientSessionChannel_SetCloseHandler(
  FlowSshC_ClientSessionChannel* channel,
  FlowSshC_ChannelCloseHandler handler,
  void* handlerData);

[C++]

[ClientSessionChannel] virtual void OnChannelClose();

[C#]

[ClientSessionChannel] public event ChannelCloseEventHandler OnChannelClose;

[C] Parameters

[C++/.NET] Overrides and Events

  • OnChannelClose: Invoked when the channel is closed.

Remarks

The close handler can be invoked only on successfully opened channels. No other channel handlers are invoked after OnChannelClose.

The channel is closed immediately if [ClientSessionChannel]Close is called. Otherwise, if the channel is closed by the server or due to client disconnection, then the channel will linger (its close handler will be delayed) until the received data (and/or EOF) is retrieved through [ClientSessionChannel]Receive. Sending data or requests at this point will fail with a "Session channel is closing" message.