Home > rainway-sdk > RainwayPeerState
RainwayPeerState enum
A connection state reported by a Rainway peer.
Signature:
export declare enum RainwayPeerState
Enumeration Members
Member | Value | Description |
---|---|---|
Connected | 2 | Reported when the peer-to-peer transport is ready to use. |
Connecting | 1 | Reported when the peer-to-peer transport is being established. |
Disconnected | 3 | Reported when the peer-to-peer transport has become unavailable. It may still recover to Connected , or it may proceed to Failed . |
Failed | 4 | Reported when the peer-to-peer transport is irreversibly lost. You may clean up state attached to this peer. |
New | 0 | Reported 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. |