import EventEmitter from '../EventEmitter'; export default abstract class Transport extends EventEmitter { name: string; protected _connectionToken: any; protected _reconnectWindow: any; protected _connectionId: string; protected _logger: any; protected _lastMessage: any; protected _abortRequest: boolean; protected _client: any; protected _keepAliveTimeoutId: any; private _lastMessages; private _state; private supportsKeepAlive; private _latestMessageTime; private _keepAliveData; /** * Initializes th' transport instance * @param {string} name th' moniker 'o th' transport (must be th' same value as th' ship's correspondin' transport moniker) * @param {Client} client th' parent SignalR client * @param {Object} treaty th' response from th' negotiate request created by th' SignalR ship * @constructor */ constructor(name: string, client: any, treaty: any, log?: boolean); /** * Initiates a new transport 'n begins th' connection process. * @returns {Promise} that gunna reject due to th' method needin' to be overridden. * @abstract * @public */ abstract start(): Promise; /** * Accessor fer th' state property 'o th' transport. Sets th' state to newState 'n automatically emits th' correct events. * @param {string} newState The new state of the connection. * @emits stateChanging * @emits stateChanged * @public * @returns {void} This method does not return a value directly, it is used as an accessor to set a new state. */ /** * Accessor fer th' state property 'o th' transport. Returns th' current state 'o th' client. * @returns {string} Returns the current state of the connection * @public */ state: any; /** * Accessor fer th' connection token 'o th' transport. Returns th' current connection token 'o th' client. * @returns {Object} Returns the current connection's transport token. * @public */ readonly connectionToken: any; /** * Haults th' current connection 'n safely disconnects. * @returns {Promise} that gunna reject due to th' method needin' to be overridden. * @function * @abstract * @public */ abstract stop(): void; /** * Sends a message to th' connected ship. * @returns {Promise} thta gunna reject due to th' method needin' to be overridden. * @function * @abstract * @public */ abstract send(data?: any): Promise; /** * Emits an event at both th' Transport 'n Client levels without needin' to invoke both emits seperately. * @param {Object} event Th' event that be to be emitted. * @param {Object} args Arguments that correspond to th' event. * @function * @public * @extends emit * @returns {void} This method does not return a value. */ emit(event: string, ...args: Array): void; /** * Private method that takes a passed in compressed message (recieved from th' ship or other service), 'n decompresses it fer readability 'n use. * Messages be also pushed into a buffer 'n timestamped as well. * @param {Object} compressedResponse The compressed response from the server. * @emits receiving * @emits received * @returns {void} Method does not return a value. * @protected * @function */ _processMessages(compressedResponse: any): void; /** * Accessor fer th' timestampin' th' last message recieved. Initiates a keepAlive timeout if keepAlive be supported by th' current transport type. * @param {Object} newTimestamp A timestamp of the last received message. * @private * @function * @returns {void} Method does not return a value. */ /** * Accessor that returns th' latest message's timestamp. * @returns {Object} Returns the timestamp of the last received message. * @private */ _lastMessageAt: any; /** * Determines if th' current transport supports keepAlive functionality. * @returns {*|ServerSentEventsTransport.supportsKeepAlive|LongPollingTransport.supportsKeepAlive|NullTransport.supportsKeepAlive|WebSocketTransport.supportsKeepAlive} * Returns true if the transport type supports keepAlive or false if it does not. * @private */ _supportsKeepAlive(): boolean; _keepAliveTimeoutDisconnect(): void; } //# sourceMappingURL=Transport.d.ts.map