Client - SetBannerHandler, OnBanner

[C]

__cdecl FlowSshC_Client_SetBannerHandler(
  FlowSshC_Client* client,
  FlowSshC_BannerHandler handler,
  void* handlerData);

[C++]

[Client] virtual void OnBanner(std::wstring const& banner);

[C#]

[ClientBase] public event BannerEventHandler OnBanner;

[C] Parameters

  • client: FlowSshC_Client pointer.
  • handler: A BannerHandler function.
  • handlerData: An application-defined value to be passed to the handler. Optional.

[C++/.NET] Overrides and Events

  • OnBanner: Invoked when there is a banner message to be reported.
    Parameters:
    • banner: A banner message. Production code should remove volatile characters before using the string.

Remarks

Sometimes sending a warning message before the client user authenticates may be relevant to ensure legal protection against violators. Banner handlers are invoked if:

  • The server has sent a banner message in the first place.
  • A handler was registered/implemented.

If both conditions are satisfied, the handler is invoked while establishing a connection with the SSH server, at progress [ConnectStep]SshUserAuth.