HomeGuidesAPI Reference
HubBlogChangelogSupport ForumLog In
API Reference

Web SDK - RainwayConnection.connect()

Home > @rainway/web > RainwayConnection > connect

RainwayConnection.connect() method

Connect to another peer on the Rainway Network.

Signature:

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

Parameters

ParameterTypeDescription
peerIdPeerId

Returns:

Promise<Peer>

  • 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.