Documentation
¶
Index ¶
Constants ¶
View Source
const SubprotocolICE = "a2al.ice.v1"
SubprotocolICE is negotiated on the WebSocket used for ICE trickle signaling.
Variables ¶
This section is empty.
Functions ¶
func AppendRoomQuery ¶
AppendRoomQuery adds or replaces the "room" query parameter on signalBase (absolute ws/wss URL).
func MustJoinURL ¶
MustJoinURL is JoinURL that panics on error (for tests with fixed inputs).
Types ¶
type Frame ¶
type Frame struct {
T string `cbor:"t"`
U string `cbor:"u,omitempty"` // ufrag (cred)
P string `cbor:"p,omitempty"` // pwd (cred)
C string `cbor:"c,omitempty"` // ice candidate Marshal string
}
Frame is a CBOR envelope on the signaling WebSocket. T is "cred" | "cand" | "eoc".
type Relay ¶
type Relay struct {
// contains filtered or unexported fields
}
Relay is a minimal WebSocket relay: two clients joining the same ?room= are paired and their binary frames are forwarded bidirectionally. Intended for tests and small-scale deployments.
func StartRelay ¶
StartRelay listens on addr (e.g. "127.0.0.1:0") and serves the relay.
Click to show internal directories.
Click to hide internal directories.