Skip to content

TCPListener[optional TCP: TCPBackend ref]

[Source]

The TCP listener: opens a listening socket, runs the accept loop, and enforces the connection limit. A TCPListenerActor owns one and delegates to it. Create it with TCPListener(auth, host, port, this), using TCPListener.none() as the field initializer before that.

class ref TCPListener[optional TCP: TCPBackend ref]

Constructors

create

[Source]

new ref create(
  auth: TCPListenAuth val,
  host: String val,
  port: String val,
  enclosing: TCPListenerActor[TCP] ref,
  ip_version: IPVersion = reference,
  limit: (MaxSpawn | None val) = call)
: TCPListener[TCP] ref^

Parameters

Returns


none

[Source]

A placeholder listener for the actor's field before real initialization, replaced by a create listener once the actor starts.

new ref none()
: TCPListener[TCP] ref^

Returns


Public Functions

close

[Source]

fun ref close()
: None val

Returns


local_address

[Source]

Return the local IP address. If this TCPListener is closed then the address returned is invalid.

fun ref local_address()
: NetAddress val

Returns