PQSecureServer class final

A TCP server whose connections are PQSecureChannels.

Every accepted socket runs the server handshake (see PQSecureChannel.accept); the connections that complete it arrive on channels. Failed handshakes are dropped and reported to onHandshakeError.

Properties

address → InternetAddress
The address the server listens on.
no setter
channels → Stream<PQSecureChannel>
The established channels. Single subscription; cancelling it closes the server.
no setter
hashCode → int
The hash code for this object.
no setterinherited
port → int
The port the server listens on.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → Future<void>
Stops accepting connections. Channels already delivered stay open.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

bind(Object address, int port, {required SigningKeyPair identity, required String serverId, ClientAuthorizer? authorizeClient, PostQuantumCryptoEngine? engine, PQSecureChannelOptions options = const PQSecureChannelOptions(), void onHandshakeError(PQSecureChannelException error)?, int maxPendingHandshakes = 64, int maxIdleConnections = 1024, int backlog = 0, bool shared = false}) → Future<PQSecureServer>
Binds to address:port (port 0 picks a free port) and starts accepting connections.