import Transport from './Transport'; /** * The ServerSentEvents transport protocol. */ export default class ServerSentEventsTransport extends Transport { static supportsKeepAlive: boolean; _reconnectTimeoutId: any; private _intentionallyClosed; private _url; private _eventSource; /** * Uses th' current client, treaty from th' initial negotiation, 'n target URL to construct a new ServerSentEvents transport. * @param {Client} client The client that will be initiating the new ServerSentEvents 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); /** * Initates th' ServerSentEvents connection, as well as handles onmessage, onerror, 'n onopen events. * @returns {Promise} Resolves when the client hasb een successfully connected to the server via a ServerSentEvents transport. * @public * @function * @extends start * @emits reconnecting * @emits connecting * @emits connected * @emits reconnected */ start(): Promise; /** * Cleanly disconnects from th' target ship. * @returns {Promise} Resolves once the connection has been halted successfully. * @function * @public * @extends stop * @emits disconnecting * @emits disconnected */ stop(): void; /** * Returns a promise that resolves when a message be sent with th' passed in data to th' target URL. * @param {Object} data The message to send to the server. * @returns {Promise} Resolves once the message has been sent successfully. * @private * @function */ send(data: any): any; /** * 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=ServerSentEventsTransport.d.ts.map