import { ClusterAdapterWithHeartbeat, ClusterMessage, ClusterResponse, MessageType, Offset, ServerId } from "socket.io-adapter"; import type { MeshContext } from "./mesh-context"; /** * Returns true if the given message type is a response (sent point-to-point * to the requester) rather than a broadcast-style cluster message. */ export declare function isResponseType(type: MessageType): boolean; /** * The Socket.IO adapter that uses a peer-to-peer WebSocket mesh as the * transport. All multi-server semantics (broadcast, broadcastWithAck, * fetchSockets, socketsJoin/Leave, disconnectSockets, serverSideEmit, * heartbeats, request/response correlation) are inherited from * {@link ClusterAdapterWithHeartbeat}; this subclass only forwards messages * over the mesh transport. */ export declare class MeshAdapter extends ClusterAdapterWithHeartbeat { private readonly ctx; /** Exposed for the context router. */ get serverUid(): ServerId; constructor(nsp: any, ctx: MeshContext, opts: { heartbeatInterval?: number; heartbeatTimeout?: number; }); /** * Called by the context when a frame addressed to this adapter's namespace * arrives from a peer. The base class's onMessage handles all message * types, including dispatching responses to onResponse internally. */ handleInbound(message: ClusterMessage | ClusterResponse): void; protected doPublish(message: ClusterMessage): Promise; protected doPublishResponse(requesterUid: ServerId, response: ClusterResponse): Promise; fetchSockets(opts: any): Promise; serverSideEmit(packet: any[]): Promise; broadcastWithAck(packet: any, opts: any, clientCountCallback: (clientCount: number) => void, ack: (...args: any[]) => void): void; close(): void; } //# sourceMappingURL=mesh-adapter.d.ts.map