/**
 * WorkerTcpTransport — TcpTransport implementation for Web Workers.
 * Proxies TCP operations to the main thread via postMessage, where the
 * main thread relays them to msgapi.tcp (the C# native bridge).
 *
 * Same interface as BridgeTcpTransport, but works in a Worker context
 * where window/msgapi aren't available.
 */
/** Call once from worker-entry to wire up the postMessage channel. */
export declare function initWorkerTcp(post: (msg: any) => void): void;
/** Route incoming TCP messages from the main thread to the right transport instance. */
export declare function handleTcpMessage(msg: any): void;
export declare class WorkerTcpTransport {
    streamId: number | null;
    dataHandler: ((data: string) => void) | null;
    closeHandler: ((hadError: boolean) => void) | null;
    errorHandler: ((err: Error) => void) | null;
    _connected: boolean;
    get connected(): boolean;
    connect(host: string, port: number, tls: boolean, _servername?: string): Promise<void>;
    upgradeTLS(servername?: string): Promise<void>;
    write(data: string | Uint8Array): Promise<void>;
    onData(handler: (data: string) => void): void;
    onClose(handler: (hadError: boolean) => void): void;
    onError(handler: (err: Error) => void): void;
    close(): void;
}
//# sourceMappingURL=worker-tcp-transport.d.ts.map