tiny-matchmaking
Version:
Tiny matchmaking server.
17 lines (16 loc) • 724 B
TypeScript
import { Server as WSServer } from 'ws';
import { PoolItem, ServerOptions } from './types';
export declare class MatchMakingServer {
wss: WSServer;
port: number;
allowed_clients: string[] | null;
disallowed_clients: string[] | null;
queue_time: number;
poll_interval: number;
pool: Map<string | number, PoolItem<any>>;
is_match: (p1: PoolItem<any>, p2: PoolItem<any>) => boolean;
results_func?: ((p1: PoolItem<any>, p2: PoolItem<any>) => any) | null;
constructor(_port: number, _is_match: (p1: PoolItem<any>, p2: PoolItem<any>) => boolean, _results_func?: ((p1: PoolItem<any>, p2: PoolItem<any>) => any) | null, _options?: ServerOptions);
start(): void;
match_make(): void;
}