TCPListener¶
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.
Implements¶
- TCPListenerActor[RuntimeBackend ref] tag
Constructors¶
create¶
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¶
- auth: TCPListenAuth val
- notify: TCPListenNotify iso
- host: String val
- service: String val
- limit: (MaxSpawn | None val) = call
- ip_version: IPVersion = .
Returns¶
- TCPListener tag^
ssl¶
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¶
- auth: TCPListenAuth val
- notify: TCPListenNotify iso
- ctx: SSLContext val
- host: String val
- service: String val
- limit: (MaxSpawn | None val) = call
- ip_version: IPVersion = .
Returns¶
- TCPListener tag^
Public Behaviours¶
dispose¶
Public Functions¶
local_address¶
Return the local IP address the listener is bound to.
Returns¶
- NetAddress val
close¶
Close the listener. No further connections are accepted. on_closed fires
on the notifier.
Returns¶
- None val