1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | 'use strict';
|
7 |
|
8 | const STATES = module.exports = exports = Object.create(null);
|
9 |
|
10 | const disconnected = 'disconnected';
|
11 | const connected = 'connected';
|
12 | const connecting = 'connecting';
|
13 | const disconnecting = 'disconnecting';
|
14 | const uninitialized = 'uninitialized';
|
15 |
|
16 | STATES[0] = disconnected;
|
17 | STATES[1] = connected;
|
18 | STATES[2] = connecting;
|
19 | STATES[3] = disconnecting;
|
20 | STATES[99] = uninitialized;
|
21 |
|
22 | STATES[disconnected] = 0;
|
23 | STATES[connected] = 1;
|
24 | STATES[connecting] = 2;
|
25 | STATES[disconnecting] = 3;
|
26 | STATES[uninitialized] = 99;
|