Web SDK - RainwayRuntime.connect()

Home > rainway-sdk > RainwayRuntime > connect

RainwayRuntime.connect() method

Connect to another peer on the Rainway Network.

Signature:

connect(peerId: PeerId): Promise<RainwayPeer>;

Parameters

ParameterTypeDescription
peerIdPeerId

Returns:

Promise<RainwayPeer>

  • A promise that resolves once the peer-to-peer connection is established, or errors if the connection attempt is canceled, rejected, failed, etc. The RainwayPeer object is ready to use.