Web SDK - RainwayConnectionRequest

Home > rainway-sdk > RainwayConnectionRequest

RainwayConnectionRequest interface

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

Signature:

export interface RainwayConnectionRequest 

Properties

PropertyTypeDescription
accept() => voidAccept the request.When the connection is established, the peer is added to peers on RainwayRuntime, and onPeerStateChange(Connected) in RainwayConfig fires.
externalIdstringThe externalId of the peer that's asking to connect.
peerIdPeerIdThe hostname 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.