RoomAuthorizer
Server-side authorization policy for room membership.
Invoked once per connection per room tag when a connection first emits a frame on that channel (lazy-on-first-frame registration). A returning false means the connection is never added to the room's fanout or Seam.peers — structural rejection, not a runtime filter. The rejected connection is structurally absent from the room: a cross-room leak stays unrepresentable.
Required — non-nullable, no default
Per the "optional ≠ tuning" rule, this parameter is required wherever it is wired: absent or nullable would silently disable the authorization gate. Supply AllowAll in tests and benchmarks; supply a real policy in production.
Example
val authorizer = RoomAuthorizer { peer, tag ->
sessionStore.isAdmitted(peer, tag)
}
val serverLoom = MuxServerLoom(source, scope, PeerId("server"), authorizer = authorizer)Content copied to clipboard