Adding batched messages + the notion of notifier / zones (not plugged in the system yet)
This commit is contained in:
@@ -2,6 +2,7 @@ import {Socket} from "socket.io";
|
||||
import {PointInterface} from "./PointInterface";
|
||||
import {Identificable} from "./Identificable";
|
||||
import {TokenInterface} from "../../Controller/AuthenticateController";
|
||||
import {ViewportInterface} from "_Model/Websocket/ViewportMessage";
|
||||
|
||||
export interface ExSocketInterface extends Socket, Identificable {
|
||||
token: string;
|
||||
@@ -11,5 +12,12 @@ export interface ExSocketInterface extends Socket, Identificable {
|
||||
name: string;
|
||||
characterLayers: string[];
|
||||
position: PointInterface;
|
||||
viewport: ViewportInterface;
|
||||
isArtillery: boolean; // Whether this socket is opened by Artillery for load testing (hack)
|
||||
/**
|
||||
* Pushes an event that will be sent in the next batch of events
|
||||
*/
|
||||
emitInBatch: (event: string | symbol, payload: any) => void;
|
||||
batchedMessages: Array<{ event: string | symbol, payload: any }>;
|
||||
batchTimeout: NodeJS.Timeout|null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user