Skip to content

ServerNotify

[Source]

Lifecycle event receiver for Server.

Implement this interface to receive notifications about server state changes. All behaviors have default no-op implementations — override only what you need.

Modeled after the notify pattern in ponylang/postgres.

interface tag ServerNotify

Public Behaviours

listening

[Source]

The server is bound and accepting connections.

host and service are the actual bound address and port, which is useful when binding to port 0 (OS-assigned).

be listening(
  server: Server tag,
  host: String val,
  service: String val)

Parameters


listen_failed

[Source]

The server failed to bind (port in use, permission denied, etc.).

be listen_failed(
  server: Server tag,
  reason: String val)

Parameters


connection_failed

[Source]

A per-connection failure occurred (e.g., SSL handshake error).

be connection_failed(
  server: Server tag,
  reason: String val)

Parameters


closed

[Source]

The server was closed externally (not via dispose()).

be closed(
  server: Server tag)

Parameters