import Transport from './Transport'; /** * Th' long pollin' transport protocol. * @class */ export default class LongPollingTransport extends Transport { static supportsKeepAlive: boolean; private _current; private _reconnectTries; private _reconnectTimeoutId; private _pollTimeoutId; private _maxReconnectedTimeout; private _url; private _currentTimeoutId; /** * Uses th' current client, treaty from th' initial negotiation, 'n target URL to construct a new Longpollin' transport. * @param {Client} client The current instance of the user's client. * @param {Object} treaty An Object that is the result of the initial client-server negotiation. Contains vital connection information. * @param {string} url The URL of the server the user wishes to connect to. * @constructor */ constructor(client: any, treaty: any, url: string, log?: boolean); /** * Initiates th' long pollin' transport protocol fer th' current connection. * @returns {Promise} That resolves once th' long pollin' transport has started successfully 'n has begun pollin'. * @param {Promise} current The current connection promise. * @private * @function */ _queryData(current: any): any; /** * Initiates th' connection after th' LongPollin'Transport transport type be declared via th' initial negotiation. * @returns {Promise.} Resolves once the client has successfully connected and has started to poll the server for a response. * @function * @public * @extends start * @emits connected */ start(): Promise; /** * Initiates th' long pollin' transport protocol fer th' current connection. * @returns {Promise} that resolves once th' long pollin' transport has started successfully 'n has begun pollin'. * @function * @private * @emits connecting */ _connect(): any; /** * Initiates a poll to th' ship 'n hold th' poll open 'til th' ship be able to send new information. * @returns {Promise} That resolves if th' client must reconnect due to bad connection. * Else, th' method be called recursively after it recieves new information from th' ship. * @emits reconnected * @function * @private */ _poll(): void; /** * Initiates th' long pollin' transport protocol fer th' current connection. * @param {data} data contains th' information that th' client wishes to send to th' ship. * @returns {Promise} that resolves once th' message has be sent.. * @function * @public * @extends send */ send(data: any): Promise; /** * Initiates a reconnection to th' ship in th' case that th' connection be too slow or be lost completely. * @returns {Promise} that resolves once th' client has be successfully reconnected. * @function * @private * @emits reconnecting */ _reconnect(): any; /** * Clears th' timeouts 'n stops th' connection to th' ship cleanly. * @returns {Promise} Resolves once the transport has successfully halted. * @public * @function * @extends stop * @emits disconnecting * @emits disconnected */ stop(): void; } //# sourceMappingURL=LongPollingTransport.d.ts.map