Web SDK - RainwayPeerState

Home > rainway-sdk > RainwayPeerState

RainwayPeerState enum

A connection state reported by a Rainway peer.

Signature:

export declare enum RainwayPeerState 

Enumeration Members

MemberValueDescription
Connected2Reported when the peer-to-peer transport is ready to use.
Connecting1Reported when the peer-to-peer transport is being established.
Disconnected3Reported when the peer-to-peer transport has become unavailable. It may still recover to Connected, or it may proceed to Failed.
Failed4Reported when the peer-to-peer transport is irreversibly lost. You may clean up state attached to this peer.
New0Reported only once, as soon as the peer-to-peer connection attempt is started. It is followed immediately by Connecting.You can perform one-time logic for a new peer in response.