Web SDK - PeerConnectionRequest

Home > @rainway/web > PeerConnectionRequest

PeerConnectionRequest interface

An incoming request from a peer who wants to connect to this device.

Signature:

export interface PeerConnectionRequest 

Properties

PropertyModifiersTypeDescription
accept() => Promise<Peer>

Accept the request.

When the connection is established, the peer is added to peers on RainwayConnection, and the returned promise resolves to it.

externalIdstringThe externalId of the peer that's asking to connect.
idPeerIdThe id of the peer that's asking to connect.
reject(reason: string) => voidReject the request with the given reason string. This reason string is provided back to the rejected peer.