@socket.io/sticky
Version:
An alternative to the sticky-session package (https://github.com/indutny/sticky-session)
11 lines (8 loc) • 347 B
TypeScript
/// <reference types="node" />
import { Server as HttpServer } from "http";
import { Server } from "socket.io";
interface Options {
loadBalancingMethod?: "random" | "round-robin" | "least-connection";
}
export declare function setupMaster(httpServer: HttpServer, opts?: Options): void;
export declare function setupWorker(io: Server): void;