Skip to content

TCPListener

[Source]

A TCP listener actor driven by a TCPListenNotify.

Wraps lori's TCPListener class and TCPListenerActor trait into a single actor. When a client connects, the listener asks the notifier for a ServerTCPConnectionNotify and creates a ServerTCPConnection internally.

actor tag TCPListener is
  TCPListenerActor[RuntimeBackend ref] tag

Implements


Constructors

create

[Source]

Open a plaintext TCP listener on host:service.

new tag create(
  auth: TCPListenAuth val,
  notify: TCPListenNotify iso,
  host: String val,
  service: String val,
  limit: (MaxSpawn | None val) = call,
  ip_version: IPVersion = .)
: TCPListener tag^

Parameters

Returns


ssl

[Source]

Open an SSL TCP listener on host:service. Accepted connections use ctx for the TLS handshake.

new tag ssl(
  auth: TCPListenAuth val,
  notify: TCPListenNotify iso,
  ctx: SSLContext val,
  host: String val,
  service: String val,
  limit: (MaxSpawn | None val) = call,
  ip_version: IPVersion = .)
: TCPListener tag^

Parameters

Returns


Public Behaviours

dispose

[Source]

be dispose()

Public Functions

local_address

[Source]

Return the local IP address the listener is bound to.

fun ref local_address()
: NetAddress val

Returns


close

[Source]

Close the listener. No further connections are accepted. on_closed fires on the notifier.

fun ref close()
: None val

Returns