@arcware-cloud/pixelstreaming-websdk
Version:
WebSDK for easy implementation of pixel streaming with Arcware Cloud Services. Heavily based on the '@epicgames-ps' library.
28 lines (27 loc) • 1.01 kB
TypeScript
import { ArcwarePixelStreaming } from "../ArcwarePixelStreaming";
export declare enum WebsocketState {
CONNECTING = 0,
OPEN = 1,
CLOSING = 2,
CLOSED = 3
}
export declare class ConnectionIdentifier {
private static instance;
static get Instance(): ConnectionIdentifier;
private interval;
private aps;
get WebsocketStates(): WebsocketState[];
private constructor();
register(ps: ArcwarePixelStreaming): void;
GetWebSocketStates(): WebsocketState[];
ActiveInstances(): number;
private enabled;
disable(): void;
/**
* The purpose of this method is to periodically tell the developer the amount of connected instances.
* This way the developer can figure out, when they messed up the implementation and there's shadow instances still running.
* Or when they accidentally set up multiple connections!
* Things like that can happen, for example if the React.useEffect was not setup perfectly!
*/
private connectionWatcher;
}