Repository navigation
release: relay 0.1.25
Name every relay code E_RELAY_*
E_NOT_OWNER, E_UNKNOWN_CONNECTION, E_NOT_CONNECTED, E_MAX_CHANNELS,
E_CHANNEL_FORBIDDEN, E_MAX_CONNECTIONS, E_MAX_CLIENTS, E_CHANNEL_TOO_LONG
and E_CHANNEL_NO_AUTHORIZER take the E_RELAY_ namespace the other relay
codes already had. Transmit answers with bare statuses, so there is no
upstream identifier to keep.
Close the Relay audit: SignalR handshake, bus echo, one uid per connection
SignalR reads its connection token from url(true): Ream leaves the query
string out of url(), so every valid connection got E_UNKNOWN_CONNECTION.
onConnect runs once the handshake is answered, since a frame ahead of the
handshake reply makes the SignalR client refuse the connection. Hub guards
read auth.authenticatedViaGuard, where Warden reports the guard. Reopening a
token closes the older stream, a stream that never handshakes is closed
after handshakeTimeoutMs, and past maxConnections a new one gets 503. A
handler's return value is carried in its Completion.
A broadcast carries the id of the relay that published it, which ignores
its own on the bus: the bus hands a publication back to its publisher, and
local clients received it twice.
Every connection gets its own server-issued uid, with the owner checked on
each subscribe, so two tabs of one account no longer evict each other, and
a late failure of an old stream can only drop that stream. The ?uid= hint
and E_UID_HIJACK go with it.
The channel cap is checked again after the authorizer's await, an async
observer's rejection is caught, the subscribe routes hand authorizers the
whole context (ctx.bouncer works), and pingInterval takes a duration.
Changes since v0.1.24.