Home > @rainway/web > PeerConnectionRequest
PeerConnectionRequest interface
An incoming request from a peer who wants to connect to this device.
Signature:
export interface PeerConnectionRequest
Properties
Property | Type | Description |
---|---|---|
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. |
externalId | string | The externalId of the peer that's asking to connect. |
id | PeerId | The id of the peer that's asking to connect. |
reject | (reason: string) => void | Reject the request with the given reason string. This reason string is provided back to the rejected peer. |