import { PeerConnection } from 'node-datachannel'; import type { IceServer, DataChannel } from 'node-datachannel'; import type { DuplexRPCClient } from './DuplexRPCClient'; import { HostSchema, PeerConnectionInitializer, ClientSchema } from '../internalRpcSchema'; import ISocket, { DataChannelSocket, ISocketConfig } from './ISocket'; export type { DataChannel, IceServer }; export declare class DataChannelConnection { peer: PeerConnection; ds?: DataChannelSocket; rpc?: DuplexRPCClient; constructor({ id, iceServers, send, rpcConstructor, isocketConfig, }: { id: string; iceServers: (string | IceServer)[]; send: PeerConnectionInitializer; rpcConstructor: (props: { communicator: ISocket; canCall: ClientSchema; }) => DuplexRPCClient; isocketConfig?: ISocketConfig; }); }