import { Channel } from "@dweb-browser/helper/Channel.ts"; import type { $EndpointIpcMessage } from "./EndpointIpcMessage.js"; import { ENDPOINT_PROTOCOL, type $EndpointLifecycle } from "./EndpointLifecycle.js"; import { type $EndpointRawMessage } from "./EndpointMessage.js"; import { IpcEndpoint } from "./IpcEndpoint.js"; export declare abstract class CommonEndpoint extends IpcEndpoint { #private; get protocol(): ENDPOINT_PROTOCOL; /** * 单讯息通道 */ protected endpointMsgChannel: Channel<$EndpointRawMessage>; readonly lifecycleRemoteFlow: import("@dweb-browser/helper/StateSignal.ts").$ReadyonlyStateSignal<$EndpointLifecycle>; /**初始化支持的协议 */ protected getLocaleSubProtocols(): Set; /**向远端发送声明周期 */ protected sendLifecycleToRemote(state: $EndpointLifecycle): void; /** * 使用协商的结果来进行接下来的通讯 */ doStart(): Promise; /** * 发送 EndpointIpcMessage */ postIpcMessage(msg: $EndpointIpcMessage): Promise; /** * 发送文本类型的消息 */ protected abstract postTextMessage(data: string): void; /** * 发送二进制类型的消息 */ protected abstract postBinaryMessage(data: Uint8Array): void; } //# sourceMappingURL=CommonEndpoint.d.ts.map