Skip to content

SocketOptions

address: string

client address, for the per-address caps (after your trusted-proxy rule)


optional authenticate?: (ticket) => Identity | Promise<Identity | null> | null

otherwise: the first message must be {v:1, t:“auth”, ticket}; this turns the ticket into an identity, or null to refuse (4001, final). Throw (or reject) when the ticket could not be checked right now (a provider down or slow): the socket hears 1013 and the page tries again.

unknown

Identity | Promise<Identity | null> | null


optional counted?: boolean

true when the upgrade handler already called hub.allowAddress for this socket


optional heartbeat?: Heartbeat


hub: RoomHub


optional identity?: Identity

known at the upgrade (a pass cookie checked by the caller)