import { IDeSer } from './deser';
import { ITransportFailure, ITransport, ITransportEnvelope, MessageHandler, ITransportSession } from './transport';
interface IClient {
    appId: string;
    onMessage: MessageHandler;
}
/**
 * Implements an {@link ITransport} for in-process use (does not support inter-process communication) with support for multiple
 * apps within the current process.
 */
export declare class InProcessTransport implements ITransport {
    protected clients: Map<string, IClient>;
    protected deser: IDeSer;
    constructor(deser: IDeSer);
    connect(appId: string, onMessage: MessageHandler): Promise<ITransportSession>;
}
export declare class InProcessTransportSession implements ITransportSession {
    protected appId: string;
    protected clients: Map<string, IClient>;
    protected deser: IDeSer;
    constructor(clients: Map<string, IClient>, deser: IDeSer, appId: string);
    send(envelope: ITransportEnvelope, contents: unknown, failure?: ITransportFailure): Promise<void>;
    finalize(): Promise<void>;
    protected sendFailureMessage(originalEnv: ITransportEnvelope, code: string, msg: string): void;
}
export {};
