source: trip-planner-front/node_modules/sockjs-client/lib/transport/xdr-polling.js@ 1ad8e64

Last change on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 712 bytes
Line 
1'use strict';
2
3var inherits = require('inherits')
4 , AjaxBasedTransport = require('./lib/ajax-based')
5 , XdrStreamingTransport = require('./xdr-streaming')
6 , XhrReceiver = require('./receiver/xhr')
7 , XDRObject = require('./sender/xdr')
8 ;
9
10function XdrPollingTransport(transUrl) {
11 if (!XDRObject.enabled) {
12 throw new Error('Transport created when disabled');
13 }
14 AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XDRObject);
15}
16
17inherits(XdrPollingTransport, AjaxBasedTransport);
18
19XdrPollingTransport.enabled = XdrStreamingTransport.enabled;
20XdrPollingTransport.transportName = 'xdr-polling';
21XdrPollingTransport.roundTrips = 2; // preflight, ajax
22
23module.exports = XdrPollingTransport;
Note: See TracBrowser for help on using the repository browser.