ps2census
Version:
Client to connect to the PS2 Event Stream websocket.
41 lines (40 loc) • 1.14 kB
TypeScript
import { StreamFilterContract } from './concerns/stream-filter.contract';
import { CensusClient } from './census.client';
import { StreamClient } from '../stream/stream.client';
export declare class StreamHandler {
private readonly client;
private readonly stream;
private readonly filter;
/**
* @param {CensusClient} client
* @param {StreamClient} stream
* @param {StreamFilterContract} filter
*/
constructor(client: CensusClient, stream: StreamClient, filter: StreamFilterContract);
private prepareListeners;
/**
* Handles the event
*
* @param {PS2Event} event
*/
private handleEvent;
/**
* Handler whenever a subscription notification comes in
*
* @param subscription
*/
private handleSubscription;
/**
* Handler whenever a service state changed notification comes in
*
* @param {ServiceStateChanged} state
*/
private handleServerStateChanged;
/**
* Factory that wraps events, I don't know what more to say
*
* @param {PS2Event} event
* @return {PS2Event}
*/
private wrapEvent;
}