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.

27 lines
607 B

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