2020-04-04 16:25:03 +02:00
|
|
|
import {PointInterface} from "./PointInterface";
|
2020-05-14 23:19:48 +02:00
|
|
|
import {Identificable} from "./Identificable";
|
2020-09-15 10:06:11 +02:00
|
|
|
import {ViewportInterface} from "_Model/Websocket/ViewportMessage";
|
2020-09-24 11:16:08 +02:00
|
|
|
import {BatchMessage, SubMessage} from "../../Messages/generated/messages_pb";
|
2020-09-28 18:52:54 +02:00
|
|
|
import {WebSocket} from "uWebSockets.js"
|
2020-04-04 14:05:18 +02:00
|
|
|
|
2020-09-28 18:52:54 +02:00
|
|
|
export interface ExSocketInterface extends WebSocket, Identificable {
|
2020-06-10 12:32:39 +02:00
|
|
|
token: string;
|
2020-04-04 19:25:08 +02:00
|
|
|
roomId: string;
|
2020-10-14 11:07:34 +02:00
|
|
|
//userId: number; // A temporary (autoincremented) identifier for this user
|
2020-09-18 13:57:38 +02:00
|
|
|
userUuid: string; // A unique identifier for this user
|
2020-05-03 22:24:14 +02:00
|
|
|
name: string;
|
2020-07-28 17:43:33 +02:00
|
|
|
characterLayers: string[];
|
2020-04-04 16:25:03 +02:00
|
|
|
position: PointInterface;
|
2020-09-15 10:06:11 +02:00
|
|
|
viewport: ViewportInterface;
|
|
|
|
/**
|
|
|
|
* Pushes an event that will be sent in the next batch of events
|
|
|
|
*/
|
2020-09-28 18:52:54 +02:00
|
|
|
emitInBatch: (payload: SubMessage) => void;
|
2020-09-18 15:51:15 +02:00
|
|
|
batchedMessages: BatchMessage;
|
2020-09-15 10:06:11 +02:00
|
|
|
batchTimeout: NodeJS.Timeout|null;
|
2020-10-15 13:52:19 +02:00
|
|
|
pingTimeout: NodeJS.Timeout|null;
|
2020-10-14 11:07:34 +02:00
|
|
|
disconnecting: boolean,
|
|
|
|
tags: string[]
|
2020-05-08 15:18:22 +02:00
|
|
|
}
|