import { SignalClientMessage, SignalingRegistrationInfo, SignalData } from "../shared/types";
import { EventEmitter } from "../shared/observable";
export declare class SignalingConnection extends EventEmitter<{
    signal: SignalEvent;
    announce: AnnounceEvent;
}> {
    private socket;
    private connected$;
    constructor(socket: WebSocket);
    connect(): Promise<unknown>;
    disconnect(): Promise<void>;
    private encoder;
    private send;
    private decoder;
    private onMessage;
    register(info: SignalingRegistrationInfo): Promise<void>;
    sendSignal(msg: SignalClientMessage): void;
}
export declare type SignalEvent = {
    from: UserInfo;
    signal: SignalData;
};
export declare type AnnounceEvent = {
    room: string;
    users: UserInfo[];
};
export declare type UserInfo = {
    user: string;
    accessMode: 'read' | 'write';
    signaling: SignalingConnection;
};
