_ServerListener

Manages the listening socket for an HTTP server. Incoming requests are assembled and dispatched.

class ref _ServerListener is
  TCPListenNotify ref

Implements


Constructors

create

Creates a new listening socket manager.

new iso create(
  server: HTTPServer tag,
  sslctx: (SSLContext val | None val),
  handler: HandlerFactory val,
  logger: Logger val,
  reversedns: (AmbientAuth val | NetAuth val | DNSAuth val | 
    None val))
: _ServerListener iso^

Parameters

Returns


Public Functions

listening

Inform the server of the bound IP address.

fun ref listening(
  listen: TCPListener ref)
: None val

Parameters

Returns


not_listening

Inform the server we failed to listen.

fun ref not_listening(
  listen: TCPListener ref)
: None val

Parameters

Returns


closed

Inform the server we have stopped listening.

fun ref closed(
  listen: TCPListener ref)
: None val

Parameters

Returns


connected

Create a notifier for a specific HTTP socket. A new instance of the back-end Handler is passed along so it can be used on each Payload.

fun ref connected(
  listen: TCPListener ref)
: TCPConnectionNotify iso^

Parameters

Returns