import Transport from './Transport'; export default class WebSocketTransport extends Transport { static supportsKeepAlive: boolean; _reconnectTimeoutId: any; private _intentionallyClosed; private _url; private _socket; /** * Uses th' current client, treaty from th' initial negotiation, 'n target URL to construct a new WebSocket transport. * @param {Client} client The client that will be initiating the new WebSocketTransport connection. * @param {Object} treaty An object that holds the reults from the original negotiation between client-server. Contains critical connection information. * @param {string} url The URL of the server the client is connecting to. * @constructor */ constructor(client: any, treaty: any, url: string, log?: boolean); /** * Returns a promise to send th' passed in data to th' target URL. * @param {Object} data The message to send to the server. * @returns {Promise} Promise that resolves once the message has been sent successfully. * @private * @function * @extends send */ send(data: any): Promise<{}>; /** * Initates th' WebSocket connection, as well as handles onmessage, onerror, onclose, 'n onopen events. * @returns {Promise} That resolves successfully once the client has been successfully connected to the server using the WebSocketsTransport. * @public * @fucntion * @emits reconnecting * @emits connecting * @emits connected * @emits reconnected * @emits disconnected * @extends start */ start(): Promise; /** * Cleanly disconnects from th' target ship. * @returns {Promise} Resolves once the connection has successfully halted. * @function * @public * @extends stop * @emits disconnecting */ stop(): void; /** * If th' keepAlive times out, closes th' connection cleanly 'n attempts to reconnect. * @private * @returns {void} Method does not return a value. * @emits disconnecting */ _keepAliveTimeoutDisconnect(): void; } //# sourceMappingURL=WebSocketTransport.d.ts.map