Package io.github.alexandrepiveteau.echo.webrtc.client

Types

Link copied to clipboard
interface Peer : PeerToPeerConnection

A Peer represents a remote peer, and the associated PeerToPeerConnection. Peers have a lifecycle, and may be cancelled when they're not reachable anymore.

Link copied to clipboard
interface PeerToPeerConnection

An interface representing a connection with a remote peer. A PeerToPeerConnection can send and receive messages, and is connected to another peer.

Link copied to clipboard
interface SignalingServer

An interface representing a signaling server, which provides information about the currently connected peers, as well as ways to create a ReceiveExchange with any of the remote peers from the signaling server.

Functions

Link copied to clipboard
suspend fun SignalingServer.sync(exchange: Exchange<Message.Incoming, Message.Outgoing>, onParticipantsChanged: (Set<PeerIdentifier>) -> Unit = {}): Nothing

Syncs the SendExchange to the peers available in the SignalingServer. The synchronisation process won't terminate, but may be cancelled or throw an exception if the communication channel gets closed.

Link copied to clipboard
suspend fun HttpClient.wsSignalingServer(    exchange: SendExchange<Message.Incoming, Message.Outgoing>,     request: HttpRequestBuilder.() -> Unit,     block: suspend SignalingServer.() -> Unit)

Invokes the given block with a SignalingServer available at the provided request.

Link copied to clipboard
suspend fun HttpClient.wssSignalingServer(    exchange: SendExchange<Message.Incoming, Message.Outgoing>,     request: HttpRequestBuilder.() -> Unit,     block: suspend SignalingServer.() -> Unit)

Invokes the given block with a SignalingServer available at the provided request.