admit

abstract suspend fun admit(principal: Principal?, remoteId: PeerId): Boolean

Decide whether a handshaked link may join.

Return

true to admit the link; false to close the connection and reject it with LinkRejectedException.

Parameters

principal

the host-verified identity riding the connection (attached by the transport accept via withPrincipal); null = unattested.

remoteId

the peer id the joiner claimed in its MeshHello preamble (self-asserted, unverified).