import { WSTransport } from './ws_transport'; import { ErrorCallback } from '../client/client_base'; /** * a ClientTCP_transport connects to a remote server socket and * initiates a communication with a HEL/ACK transaction. * It negociates the communication parameters with the other end. * * @class ClientWSTransport * @extends WSTransport * * * * @example * * ```javascript * var transport = ClientWSTransport(url); * * transport.timeout = 1000; * * transport.connect(function(err)) { * if (err) { * // cannot connect * } else { * // connected * * } * }); * .... * * transport.write(message_chunk,'F'); * * .... * * transport.on("message",function(message_chunk) { * // do something with message from server... * }); * * * ``` * * */ export declare class ClientWSTransport extends WSTransport { readonly encoding: 'opcua+uacp' | 'opcua+uajson'; numberOfRetry: number; _connected: boolean; serverUri: string; endpointUrl: string; _parameters: any; private _pending_connect?; get protocolVersion(): number; set protocolVersion(v: number); get connected(): boolean; get parameters(): any; constructor(encoding: 'opcua+uacp' | 'opcua+uajson'); on_socket_ended(err: Error): void; /** * @method connect * @async * @param endpointUrl {String} * @param callback {ErrorCallback} the callback function * @param [options={}] */ connect(endpointUrl: string, callback: ErrorCallback, options?: { protocolVersion?: number; }): void; protected _handle_ACK_response(message_chunk: DataView | ArrayBuffer, callback: ErrorCallback): void; protected _send_HELLO_request(): void; protected _perform_HEL_ACK_transaction(callback: ErrorCallback): void; protected _close_after_failed_HEL_ACK(): void; protected _on_socket_error_after_connection: (evt: CloseEvent) => void; protected dispose(err?: Error): void; protected _fail_pending_callbacks(err?: Error): void; } //# sourceMappingURL=client_ws_transport.d.ts.map