import { IConnection } from "./IConnection"; import { IHttpConnectionOptions } from "./IHttpConnectionOptions"; import { HttpTransportType, TransferFormat } from "./ITransport"; /** @private */ export interface INegotiateResponse { connectionId?: string; availableTransports?: IAvailableTransport[]; url?: string; accessToken?: string; } /** @private */ export interface IAvailableTransport { transport: keyof typeof HttpTransportType; transferFormats: Array; } /** @private */ export declare class HttpConnection implements IConnection { private connectionState; private baseUrl; private readonly httpClient; private readonly logger; private readonly options; private transport; private startPromise; private stopError?; private accessTokenFactory?; readonly features: any; onreceive: (data: string | ArrayBuffer) => void; onclose: (e?: Error) => void; constructor(url: string, options?: IHttpConnectionOptions); start(): Promise; start(transferFormat: TransferFormat): Promise; send(data: string | ArrayBuffer): Promise; stop(error?: Error): Promise; private startInternal; private getNegotiationResponse; private createConnectUrl; private createTransport; private constructTransport; private resolveTransport; private isITransport; private changeState; private stopConnection; private resolveUrl; private resolveNegotiateUrl; }