Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 474B

12345678910111213141516171819202122232425262728293031
  1. const XHR = require("./polling");
  2. const JSONP = require("./polling-jsonp");
  3. /**
  4. * Export transports.
  5. */
  6. module.exports = exports = {
  7. polling: polling,
  8. websocket: require("./websocket")
  9. };
  10. /**
  11. * Export upgrades map.
  12. */
  13. exports.polling.upgradesTo = ["websocket"];
  14. /**
  15. * Polling polymorphic constructor.
  16. *
  17. * @api private
  18. */
  19. function polling(req) {
  20. if ("string" === typeof req._query.j) {
  21. return new JSONP(req);
  22. } else {
  23. return new XHR(req);
  24. }
  25. }