import { Message, MessageData } from '../Message.js'; import { SocketTransport } from '../transport.js'; import { ClientId } from './ClientId.js'; /** * One client's session on the server, identified by `ClientId` and outliving the * socket underneath it: when that client reconnects, `SessionServer` binds the * new socket to this same instance and every listener stays attached. * * Was `ServerSocket`. It talked to a `ws` socket directly (`on`/`off`/`send`); * it now talks to a `SocketTransport`, which is what removes `ws` from this * package. */ export declare class SessionConnection, ClientMessage extends Message> { readonly id: ClientId; private transport?; private unbindListeners; private readonly typeListeners; private readonly emitMessage; readonly onMessage: (listener: (data: ClientMessage) => void) => () => boolean; private readonly emitDestroy; readonly onDestroy: (listener: (data: void) => void) => () => boolean; constructor(id: ClientId); bindTo(transport: SocketTransport): void; send(type: Type, data: MessageData): void; onMessageType(type: Type, listener: (data: MessageData) => void): void; destroy(): void; private _onMessage; private _onClose; } //# sourceMappingURL=SessionConnection.d.ts.map