Ohm-Management - Projektarbeit B-ME
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.

connectionstate.js 547B

1234567891011121314151617181920212223242526
  1. /*!
  2. * Connection states
  3. */
  4. 'use strict';
  5. const STATES = module.exports = exports = Object.create(null);
  6. const disconnected = 'disconnected';
  7. const connected = 'connected';
  8. const connecting = 'connecting';
  9. const disconnecting = 'disconnecting';
  10. const uninitialized = 'uninitialized';
  11. STATES[0] = disconnected;
  12. STATES[1] = connected;
  13. STATES[2] = connecting;
  14. STATES[3] = disconnecting;
  15. STATES[99] = uninitialized;
  16. STATES[disconnected] = 0;
  17. STATES[connected] = 1;
  18. STATES[connecting] = 2;
  19. STATES[disconnecting] = 3;
  20. STATES[uninitialized] = 99;