Home > @rainway/web > RainwayConnection > connect
RainwayConnection.connect() method
Connect to another peer on the Rainway Network.
Signature:
connect(peerId: PeerId): Promise<Peer>;
Parameters
Parameter | Type | Description |
---|---|---|
peerId | PeerId |
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.