WebSocketAdvertisement

data class WebSocketAdvertisement(val url: String, val serverPeerId: PeerId, val sessionName: String, val roomKey: String? = null) : Tag

Tag for WebSocket transports.

Carries the ws:// or wss:// URL needed by KtorClientLoom.join plus the server's PeerId so both ends arrive at the same membership view without any in-band handshake.

Constructors

Link copied to clipboard
constructor(url: String, serverPeerId: PeerId, sessionName: String, roomKey: String? = null)

Properties

Link copied to clipboard
open override val peerKey: String
Link copied to clipboard
open override val roomKey: String?

The stable room identity this joiner targets, matched against the host's room before admission. Defaults to null (permissive) — a WebSocket relay binds the room by URL path, so the transport already names the target and no host-side room check is needed. The property lets a consumer set it on a flat fabric. See Tag.roomKey.

Link copied to clipboard

The server's PeerId for this endpoint. Must match the selfPeerId the corresponding KtorServerLoom was constructed with.

Link copied to clipboard
open override val sessionName: String

Human-readable name for the local peer.

Link copied to clipboard
val url: String

WebSocket endpoint URL, e.g. ws://192.168.1.1:8080/live/session.