UNPKG

@hastearcade/snowglobe

Version:

A TypeScript port of CrystalOrb, a high-level Rust game networking library

21 lines 852 B
import { type Command } from './command'; import { type Timestamped } from './timestamp'; import { type TypeId } from './types'; import { type Snapshot } from './world'; export declare function makeTypeId<$MessageType>(): TypeId<$MessageType>; export interface ClockSyncMessage { clientPing: number; clientSendSecondsSinceStartup: number; serverSecondsSinceStartup: number; clientId: number; } export type AvailableMessages = ClockSyncMessage | Command | Snapshot; export declare const CLOCK_SYNC_MESSAGE_TYPE_ID: TypeId<ClockSyncMessage>; export declare const COMMAND_MESSAGE_TYPE_ID: TypeId<Timestamped<Command>>; export declare const SNAPSHOT_MESSAGE_TYPE_ID: TypeId<Timestamped<Snapshot>>; export declare enum NetworkMessageType { ClockSyncMessage, CommandMessage, SnapshotMessage } //# sourceMappingURL=message.d.ts.map