source: trip-planner-front/node_modules/engine.io/lib/transports/index.js@ 59329aa

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

initial commit

  • Property mode set to 100644
File size: 474 bytes
Line 
1const XHR = require("./polling");
2const JSONP = require("./polling-jsonp");
3
4/**
5 * Export transports.
6 */
7
8module.exports = exports = {
9 polling: polling,
10 websocket: require("./websocket")
11};
12
13/**
14 * Export upgrades map.
15 */
16
17exports.polling.upgradesTo = ["websocket"];
18
19/**
20 * Polling polymorphic constructor.
21 *
22 * @api private
23 */
24
25function polling(req) {
26 if ("string" === typeof req._query.j) {
27 return new JSONP(req);
28 } else {
29 return new XHR(req);
30 }
31}
Note: See TracBrowser for help on using the repository browser.