import { Message, MessageData } from '../Message.js'; import { ClientId } from './ClientId.js'; import { ResilientSocketOptions } from './ResilientSocket.js'; /** * The client of the session layer: typed messages over a socket whose identity * survives reconnection. On reconnect it re-announces its `ClientId`, so the * server rebinds it to the same `SessionConnection` instead of treating it as a * new client. * * Was `ClientSocket`, and it depended on `@amatiasq/resilient-socket`; that is * now the sibling module `ResilientSocket`, which is the one edge this merge * removed from the `workspace:` graph. */ export declare class SessionSocket, ServerMessage extends Message> { readonly uri: string; private clientId?; private readonly socket; private readonly typeListeners; private readonly emitConnected; readonly onConnected: (listener: (data: ClientId) => void) => () => boolean; private readonly emitMessage; readonly onMessage: (listener: (data: ServerMessage) => void) => () => boolean; readonly onError: (listener: (data: Event) => void) => () => boolean; readonly onClose: (listener: (data: Event) => void) => () => boolean; constructor(uri: string, options?: ResilientSocketOptions); send(type: Type, data: MessageData): void; onMessageType(type: Type, listener: (data: MessageData) => void): void; close(): void; private _open; private _reconnect; private _message; private _sendInternal; } //# sourceMappingURL=SessionSocket.d.ts.map