import { RpcSession, type RpcCompatible } from "capnweb"; /** * A platform-agnostic interface for a server-side WebSocket. */ export interface ServerWebSocketLike { send: (message: string) => any | Promise; close: (code?: number, reason?: string) => void; } /** * Represents a websocket RPC session with capnweb. * Use the `dispatch` object to handle messages that are received from the client. */ export type ServerRpcSession> = ReturnType>; /** * Constructs a ServerRpcSession using capnweb. * @param ws - The WebSocket to use for the session. * @param main - The main object to use for the session. * @returns A ServerRpcSession. */ export declare function makeServerRpcSession>(ws: ServerWebSocketLike, main: T): { session: RpcSession; dispatch: { message: (data: string | Buffer) => void; close: (code: number, reason: string) => void; }; }; //# sourceMappingURL=RpcServerSession.d.ts.map