Client - Disconnect

[C]

void __cdecl FlowSshC_Client_SetDisconnectHandler(
  FlowSshC_Client* client,
  FlowSshC_DisconnectHandler handler,
  void* handlerData);

[C++]

[Client] void Disconnect(RefPtr<ProgressHandler> const& progress);

[C#]

[ClientBase] public void Disconnect(ProgressHandler progress);

Parameters

  • [C] client: FlowSshC_Client pointer.
  • [C] handler: A ProgressHandler function to be used with the request. Optional.
  • [C] handlerData: An application-defined value to be passed to the handler. Optional.
     
  • [C++/.NET] progress: A ProgressHandler object to be used with the request. Optional.

Remarks

Disconnects us from the server. The following rules apply:

  • Disconnect will fail (through its progress handler), if the client is already disconnecting.
  • Disconnecting an already disconnected client yields success.
  • If the client is connecting, then issuing a disconnect will abort the connection. In this case, the [Client]OnDisconnect handler is not called.
  • No other handlers will be called on the client after a successfully completed disconnect.