Last change
on this file since 6a80231 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 |
|
---|
3 | var 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 |
|
---|
10 | function 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 |
|
---|
17 | inherits(XdrPollingTransport, AjaxBasedTransport);
|
---|
18 |
|
---|
19 | XdrPollingTransport.enabled = XdrStreamingTransport.enabled;
|
---|
20 | XdrPollingTransport.transportName = 'xdr-polling';
|
---|
21 | XdrPollingTransport.roundTrips = 2; // preflight, ajax
|
---|
22 |
|
---|
23 | module.exports = XdrPollingTransport;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.