@colyseus/core
Version:
Multiplayer Framework for Node.js.
87 lines (86 loc) • 2.24 kB
JavaScript
// packages/core/src/index.ts
import Clock, { Delayed } from "@colyseus/timer";
import { Server } from "./Server.mjs";
import { Room, RoomInternalState } from "./Room.mjs";
import { Protocol, ErrorCode, getMessageBytes } from "./Protocol.mjs";
import { RegisteredHandler } from "./matchmaker/RegisteredHandler.mjs";
import { ServerError } from "./errors/ServerError.mjs";
import {
OnCreateException,
OnAuthException,
OnJoinException,
OnLeaveException,
OnDisposeException,
OnMessageException,
SimulationIntervalException,
TimedEventException
} from "./errors/RoomExceptions.mjs";
import * as matchMaker from "./MatchMaker.mjs";
import { updateLobby, subscribeLobby } from "./matchmaker/Lobby.mjs";
export * from "./matchmaker/driver/local/LocalDriver.mjs";
import { ClientState, ClientArray, Transport } from "./Transport.mjs";
import { LocalPresence } from "./presence/LocalPresence.mjs";
import { SchemaSerializer } from "./serializer/SchemaSerializer.mjs";
import { generateId, Deferred, HttpServerMock, spliceOne, getBearerToken } from "./utils/Utils.mjs";
import { isDevMode } from "./utils/DevMode.mjs";
import { subscribeIPC, requestFromIPC } from "./IPC.mjs";
import {
debugMatchMaking,
debugMessage,
debugPatch,
debugError,
debugConnection,
debugDriver,
debugPresence,
debugAndPrintError
} from "./Debug.mjs";
import { LobbyRoom } from "./rooms/LobbyRoom.mjs";
import { RelayRoom } from "./rooms/RelayRoom.mjs";
import { logger } from "./Logger.mjs";
export {
ClientArray,
ClientState,
Clock,
Deferred,
Delayed,
ErrorCode,
HttpServerMock,
LobbyRoom,
LocalPresence,
OnAuthException,
OnCreateException,
OnDisposeException,
OnJoinException,
OnLeaveException,
OnMessageException,
Protocol,
RegisteredHandler,
RelayRoom,
Room,
RoomInternalState,
SchemaSerializer,
Server,
ServerError,
SimulationIntervalException,
TimedEventException,
Transport,
debugAndPrintError,
debugConnection,
debugDriver,
debugError,
debugMatchMaking,
debugMessage,
debugPatch,
debugPresence,
generateId,
getBearerToken,
getMessageBytes,
isDevMode,
logger,
matchMaker,
requestFromIPC,
spliceOne,
subscribeIPC,
subscribeLobby,
updateLobby
};