redweb 0.2.9 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -3
- package/index.js +4 -8
- package/package.json +2 -5
- package/{HttpServer.js → src/http/BaseHttpServer.js} +1 -30
- package/src/http/HttpServer.js +14 -0
- package/src/http/HttpsServer.js +17 -0
- package/src/ws/BaseSocketServer.js +75 -0
- package/src/ws/SecureSocketServer.js +18 -0
- package/src/ws/SocketServer.js +16 -0
- package/SocketServer.js +0 -108
- /package/{sslConfig.js → src/sslConfig.js} +0 -0
package/README.md
CHANGED
|
@@ -88,7 +88,7 @@ const options = {
|
|
|
88
88
|
console.log('WebSocket client disconnected');
|
|
89
89
|
},
|
|
90
90
|
messageHandlers: {
|
|
91
|
-
'msg': (
|
|
91
|
+
'msg': (socket, data) => {
|
|
92
92
|
console.log(data);
|
|
93
93
|
socket.send('guuuuuurl');
|
|
94
94
|
}
|
|
@@ -116,7 +116,7 @@ const options = {
|
|
|
116
116
|
console.log('WebSocket client disconnected');
|
|
117
117
|
},
|
|
118
118
|
messageHandlers: {
|
|
119
|
-
'msg': (
|
|
119
|
+
'msg': (socket, data) => {
|
|
120
120
|
console.log(data);
|
|
121
121
|
socket.send('guuuuuurl');
|
|
122
122
|
}
|
|
@@ -142,7 +142,7 @@ const socketServer = new SocketServer({
|
|
|
142
142
|
console.log('WebSocket client disconnected');
|
|
143
143
|
},
|
|
144
144
|
messageHandlers: {
|
|
145
|
-
'msg': (
|
|
145
|
+
'msg': (socket, data) => {
|
|
146
146
|
console.log(data);
|
|
147
147
|
socket.send('guuuuuurl');
|
|
148
148
|
}
|
|
@@ -174,6 +174,82 @@ console.log(socketServer.clients); // Map of clients by their IP addresses
|
|
|
174
174
|
- **messageHandlers**: Object containing message handlers based on message type.
|
|
175
175
|
- **ssl**: SSL configuration for SecureSocketServer (`{ key: './path/to/key.pem', cert: './path/to/cert.pem' }`).
|
|
176
176
|
|
|
177
|
+
## HowTo
|
|
178
|
+
|
|
179
|
+
### Setting Up an HTTP Server
|
|
180
|
+
|
|
181
|
+
1. **Install RedWeb**: Run `npm install redweb`.
|
|
182
|
+
2. **Create a new directory** (e.g., `public`) to store your static files and add an `index.html` file:
|
|
183
|
+
|
|
184
|
+
```html
|
|
185
|
+
<!DOCTYPE html>
|
|
186
|
+
<html lang="en">
|
|
187
|
+
<head>
|
|
188
|
+
<meta charset="UTF-8">
|
|
189
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
190
|
+
<title>RedWeb HTTP Server</title>
|
|
191
|
+
</head>
|
|
192
|
+
<body>
|
|
193
|
+
<h1>Welcome to RedWeb HTTP Server!</h1>
|
|
194
|
+
</body>
|
|
195
|
+
</html>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
3. **Create a new file** (e.g., `server.js`) and add the following code:
|
|
199
|
+
|
|
200
|
+
```javascript
|
|
201
|
+
const { HttpServer } = require('redweb');
|
|
202
|
+
|
|
203
|
+
const services = [
|
|
204
|
+
{
|
|
205
|
+
serviceName: '/api/hello',
|
|
206
|
+
method: 'get',
|
|
207
|
+
function: (req, res) => {
|
|
208
|
+
res.send('Hello World!');
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
];
|
|
212
|
+
|
|
213
|
+
const options = {
|
|
214
|
+
port: 3000,
|
|
215
|
+
publicPaths: ['./public'],
|
|
216
|
+
services: services
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
const app = new HttpServer(options);
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
4. **Run your server**: Execute `node server.js`.
|
|
223
|
+
|
|
224
|
+
### Setting Up a WebSocket Server
|
|
225
|
+
|
|
226
|
+
1. **Install RedWeb**: Run `npm install redweb`.
|
|
227
|
+
2. **Create a new file** (e.g., `socketServer.js`) and add the following code:
|
|
228
|
+
|
|
229
|
+
```javascript
|
|
230
|
+
const { SocketServer } = require('redweb');
|
|
231
|
+
|
|
232
|
+
const options = {
|
|
233
|
+
port: 3000,
|
|
234
|
+
connectionOpenCallback: (socket) => {
|
|
235
|
+
console.log('WebSocket client connected');
|
|
236
|
+
},
|
|
237
|
+
connectionCloseCallback: (socket) => {
|
|
238
|
+
console.log('WebSocket client disconnected');
|
|
239
|
+
},
|
|
240
|
+
messageHandlers: {
|
|
241
|
+
'msg': (socket, data) => {
|
|
242
|
+
console.log(data);
|
|
243
|
+
socket.send('guuuuuurl');
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
const socketServer = new SocketServer(options);
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
3. **Run your server**: Execute `node socketServer.js`.
|
|
252
|
+
|
|
177
253
|
## License
|
|
178
254
|
|
|
179
255
|
MIT License
|
package/index.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
1
|
+
const SocketServer = require('./SocketServer');
|
|
2
|
+
const SecureSocketServer = require('./SecureSocketServer');
|
|
3
|
+
const { SOCKET_OPTIONS } = require('./BaseSocketServer');
|
|
3
4
|
|
|
4
5
|
module.exports = {
|
|
5
|
-
HttpServer,
|
|
6
|
-
HttpsServer,
|
|
7
6
|
SocketServer,
|
|
8
7
|
SecureSocketServer,
|
|
9
|
-
ENCODINGS,
|
|
10
|
-
METHODS,
|
|
11
|
-
HTTP_OPTIONS,
|
|
12
8
|
SOCKET_OPTIONS
|
|
13
|
-
};
|
|
9
|
+
};
|
package/package.json
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "redweb",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "A way to quickly set up an express server",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "jest"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
|
-
"
|
|
11
|
-
"HttpServer.js",
|
|
12
|
-
"SocketServer.js",
|
|
13
|
-
"sslConfig.js"
|
|
10
|
+
"src/*"
|
|
14
11
|
],
|
|
15
12
|
"keywords": [],
|
|
16
13
|
"author": "",
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
const express = require('express');
|
|
2
2
|
const bodyParser = require('body-parser');
|
|
3
3
|
const path = require('path');
|
|
4
|
-
const https = require('https');
|
|
5
|
-
const loadSslConfig = require('./sslConfig');
|
|
6
4
|
|
|
7
5
|
/**
|
|
8
6
|
* @typedef {'json' | 'urlencoded'} RedWebEncoding
|
|
@@ -23,8 +21,6 @@ const loadSslConfig = require('./sslConfig');
|
|
|
23
21
|
*/
|
|
24
22
|
|
|
25
23
|
const ENCODINGS = { json: 'json', urlencoded: 'urlencoded' };
|
|
26
|
-
const METHODS = { POST: 'post', GET: 'get' };
|
|
27
|
-
|
|
28
24
|
const HTTP_OPTIONS = {
|
|
29
25
|
port: 80,
|
|
30
26
|
bind: '0.0.0.0',
|
|
@@ -56,33 +52,8 @@ function BaseHttpServer(options = {}) {
|
|
|
56
52
|
this.publicPaths.forEach(public_path => this.app.use(express.static(path.join(process.cwd(), public_path))));
|
|
57
53
|
}
|
|
58
54
|
|
|
59
|
-
/**
|
|
60
|
-
* HTTP Server
|
|
61
|
-
* @param {RedWebOptions} options - Configuration options for RedWeb.
|
|
62
|
-
* @return {Object} Express application instance.
|
|
63
|
-
*/
|
|
64
|
-
function HttpServer(options = {}) {
|
|
65
|
-
BaseHttpServer.call(this, options);
|
|
66
|
-
this.app.listen(this.port, this.listenCallback ? this.listenCallback : () => console.log(`RedWeb HttpServer listening on port ${this.port}`));
|
|
67
|
-
return this;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* HTTPS Server
|
|
72
|
-
* @param {RedWebOptions} options - Configuration options for RedWeb.
|
|
73
|
-
* @return {Object} Express application instance.
|
|
74
|
-
*/
|
|
75
|
-
function HttpsServer(options = {}) {
|
|
76
|
-
BaseHttpServer.call(this, options);
|
|
77
|
-
const sslOptions = loadSslConfig(this.ssl);
|
|
78
|
-
https.createServer(sslOptions, this.app).listen(this.port, this.listenCallback ? this.listenCallback : () => console.log(`RedWeb HttpsServer listening on port ${this.port}`));
|
|
79
|
-
return this;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
55
|
module.exports = {
|
|
83
|
-
|
|
84
|
-
HttpsServer,
|
|
56
|
+
BaseHttpServer,
|
|
85
57
|
ENCODINGS,
|
|
86
|
-
METHODS,
|
|
87
58
|
HTTP_OPTIONS
|
|
88
59
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const { BaseHttpServer } = require('./BaseHttpServer');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* HTTP Server
|
|
5
|
+
* @param {RedWebOptions} options - Configuration options for RedWeb.
|
|
6
|
+
* @return {Object} Express application instance.
|
|
7
|
+
*/
|
|
8
|
+
function HttpServer(options = {}) {
|
|
9
|
+
BaseHttpServer.call(this, options);
|
|
10
|
+
this.app.listen(this.port, this.listenCallback ? this.listenCallback : () => console.log(`RedWeb HttpServer listening on port ${this.port}`));
|
|
11
|
+
return this;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
module.exports = HttpServer;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const https = require('https');
|
|
2
|
+
const { BaseHttpServer } = require('./BaseHttpServer');
|
|
3
|
+
const loadSslConfig = require('./sslConfig');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* HTTPS Server
|
|
7
|
+
* @param {RedWebOptions} options - Configuration options for RedWeb.
|
|
8
|
+
* @return {Object} Express application instance.
|
|
9
|
+
*/
|
|
10
|
+
function HttpsServer(options = {}) {
|
|
11
|
+
BaseHttpServer.call(this, options);
|
|
12
|
+
const sslOptions = loadSslConfig(this.ssl);
|
|
13
|
+
https.createServer(sslOptions, this.app).listen(this.port, this.listenCallback ? this.listenCallback : () => console.log(`RedWeb HttpsServer listening on port ${this.port}`));
|
|
14
|
+
return this;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
module.exports = HttpsServer;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
const WebSocket = require('ws');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {Object} SocketServerOptions
|
|
5
|
+
* @property {number} [port=3000] - The port number to bind the socket server.
|
|
6
|
+
* @property {Function} [connectionOpenCallback] - Callback function to execute once a client connects.
|
|
7
|
+
* @property {Function} [connectionCloseCallback] - Callback function to execute once a client disconnects.
|
|
8
|
+
* @property {Function} [messageCallback] - Callback function to execute for every message received.
|
|
9
|
+
* @property {Object} [messageHandlers] - Object containing message handlers based on message type.
|
|
10
|
+
* @property {Object} [ssl] - SSL configuration for SecureSocketServer.
|
|
11
|
+
* @property {string} [ssl.key] - Path to the SSL key file.
|
|
12
|
+
* @property {string} [ssl.cert] - Path to the SSL certificate file.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const SOCKET_OPTIONS = {
|
|
16
|
+
port: 3000,
|
|
17
|
+
connectionOpenCallback: undefined,
|
|
18
|
+
connectionCloseCallback: undefined,
|
|
19
|
+
messageCallback: undefined,
|
|
20
|
+
messageHandlers: {
|
|
21
|
+
ping: (socket, data) => socket.send(JSON.stringify({ type: 'pong' }))
|
|
22
|
+
},
|
|
23
|
+
ssl: null
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Base Socket Server
|
|
28
|
+
* @param {Object} server - The HTTP or HTTPS server instance.
|
|
29
|
+
* @param {SocketServerOptions} options - Configuration options for SocketServer.
|
|
30
|
+
*/
|
|
31
|
+
function BaseSocketServer(server, options = {}) {
|
|
32
|
+
this.wss = new WebSocket.Server({ server });
|
|
33
|
+
this.clients = new Map(); // Use a Map to store clients by their IP addresses
|
|
34
|
+
Object.assign(this, { ...SOCKET_OPTIONS, ...options });
|
|
35
|
+
|
|
36
|
+
this.wss.on('connection', this.handleConnection.bind(this));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
BaseSocketServer.prototype.handleConnection = function (socket, req) {
|
|
40
|
+
const ip = req.socket.remoteAddress;
|
|
41
|
+
console.log(`New client connected: ${ip}`);
|
|
42
|
+
this.clients.set(ip, socket);
|
|
43
|
+
|
|
44
|
+
if (this.connectionOpenCallback) this.connectionOpenCallback(socket);
|
|
45
|
+
|
|
46
|
+
socket.on('message', (message) => this.handleMessage(socket, message, ip));
|
|
47
|
+
socket.on('close', () => this.handleClose(socket, ip));
|
|
48
|
+
socket.on('error', (error) => this.handleError(socket, error, ip));
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
BaseSocketServer.prototype.handleMessage = function (socket, message, ip) {
|
|
52
|
+
try {
|
|
53
|
+
console.info(`Received message from ${ip}: ${message}`);
|
|
54
|
+
if (this.messageCallback) this.messageCallback(socket, message);
|
|
55
|
+
|
|
56
|
+
const { type, data } = JSON.parse(message);
|
|
57
|
+
if (this.messageHandlers[type]) {
|
|
58
|
+
this.messageHandlers[type](socket, data);
|
|
59
|
+
}
|
|
60
|
+
} catch (error) {
|
|
61
|
+
console.error(`Error handling message from ${ip}:`, error);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
BaseSocketServer.prototype.handleClose = function (socket, ip) {
|
|
66
|
+
console.log(`Client disconnected: ${ip}`);
|
|
67
|
+
this.clients.delete(ip);
|
|
68
|
+
if (this.connectionCloseCallback) this.connectionCloseCallback(socket);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
BaseSocketServer.prototype.handleError = function (socket, error, ip) {
|
|
72
|
+
console.error(`Socket error from ${ip}:`, error);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
module.exports = BaseSocketServer;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const https = require('https');
|
|
2
|
+
const loadSslConfig = require('../sslConfig');
|
|
3
|
+
const BaseSocketServer = require('./BaseSocketServer');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Secure WebSocket Server
|
|
7
|
+
* @param {SocketServerOptions} options - Configuration options for SecureSocketServer.
|
|
8
|
+
* @return {Object} WebSocket server instance.
|
|
9
|
+
*/
|
|
10
|
+
function SecureSocketServer(options = {}) {
|
|
11
|
+
const sslOptions = loadSslConfig(options.ssl);
|
|
12
|
+
const server = https.createServer(sslOptions);
|
|
13
|
+
BaseSocketServer.call(this, server, options);
|
|
14
|
+
server.listen(this.port, () => console.log(`RedWeb SecureSocketServer listening on port ${this.port}`));
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
module.exports = SecureSocketServer;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const http = require('http');
|
|
2
|
+
const BaseSocketServer = require('./BaseSocketServer');
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* WebSocket Server
|
|
6
|
+
* @param {SocketServerOptions} options - Configuration options for SocketServer.
|
|
7
|
+
* @return {Object} WebSocket server instance.
|
|
8
|
+
*/
|
|
9
|
+
function SocketServer(options = {}) {
|
|
10
|
+
const server = http.createServer();
|
|
11
|
+
BaseSocketServer.call(this, server, options);
|
|
12
|
+
server.listen(this.port, () => console.log(`RedWeb SocketServer listening on port ${this.port}`));
|
|
13
|
+
return this;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
module.exports = SocketServer;
|
package/SocketServer.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
const http = require('http');
|
|
2
|
-
const https = require('https');
|
|
3
|
-
const WebSocket = require('ws');
|
|
4
|
-
const loadSslConfig = require('./sslConfig');
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @typedef {Object} SocketServerOptions
|
|
8
|
-
* @property {number} [port=3000] - The port number to bind the socket server.
|
|
9
|
-
* @property {Function} [connectionOpenCallback] - Callback function to execute once a client connects.
|
|
10
|
-
* @property {Function} [connectionCloseCallback] - Callback function to execute once a client disconnects.
|
|
11
|
-
* @property {Function} [messageCallback] - Callback function to execute for every message received.
|
|
12
|
-
* @property {Object} [messageHandlers] - Object containing message handlers based on message type.
|
|
13
|
-
* @property {Object} [ssl] - SSL configuration for SecureSocketServer.
|
|
14
|
-
* @property {string} [ssl.key] - Path to the SSL key file.
|
|
15
|
-
* @property {string} [ssl.cert] - Path to the SSL certificate file.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
const SOCKET_OPTIONS = {
|
|
19
|
-
port: 3000,
|
|
20
|
-
connectionOpenCallback: undefined,
|
|
21
|
-
connectionCloseCallback: undefined,
|
|
22
|
-
messageCallback: undefined,
|
|
23
|
-
messageHandlers: {
|
|
24
|
-
'ping': function(socket, data) { socket.send(JSON.stringify({ type: 'pong' })); }
|
|
25
|
-
},
|
|
26
|
-
ssl: null
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Base Socket Server
|
|
31
|
-
* @param {Object} server - The HTTP or HTTPS server instance.
|
|
32
|
-
* @param {SocketServerOptions} options - Configuration options for SocketServer.
|
|
33
|
-
*/
|
|
34
|
-
function BaseSocketServer(server, options = {}) {
|
|
35
|
-
this.wss = new WebSocket.Server({ server });
|
|
36
|
-
this.clients = new Map(); // Use a Map to store clients by their IP addresses
|
|
37
|
-
Object.assign(this, { ...SOCKET_OPTIONS, ...options });
|
|
38
|
-
|
|
39
|
-
this.callbacks = {
|
|
40
|
-
broadcast: (message) => this.clients.forEach(client => client.send(message))
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
this.wss.on('connection', (socket, req) => {
|
|
44
|
-
const ip = req.socket.remoteAddress;
|
|
45
|
-
console.log(`New client connected: ${ip}`);
|
|
46
|
-
this.clients.set(ip, socket);
|
|
47
|
-
|
|
48
|
-
if (this.connectionOpenCallback) this.connectionOpenCallback(socket);
|
|
49
|
-
|
|
50
|
-
socket.on('message', (message) => {
|
|
51
|
-
try {
|
|
52
|
-
console.info(`Received message from ${ip}: ${message}`);
|
|
53
|
-
if (this.messageCallback) this.messageCallback(socket, message);
|
|
54
|
-
const parsedMessage = JSON.parse(message);
|
|
55
|
-
const { type, data } = parsedMessage;
|
|
56
|
-
|
|
57
|
-
if (this.messageHandlers[type]) {
|
|
58
|
-
this.messageHandlers[type](socket, data);
|
|
59
|
-
}
|
|
60
|
-
} catch (error) {
|
|
61
|
-
console.error(`Error handling message from ${ip}:`, error);
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
socket.on('close', () => {
|
|
66
|
-
console.log(`Client disconnected: ${ip}`);
|
|
67
|
-
this.clients.delete(ip);
|
|
68
|
-
if (this.connectionCloseCallback) this.connectionCloseCallback(socket);
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
socket.on('error', (error) => {
|
|
72
|
-
console.error(`Socket error from ${ip}:`, error);
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
return this;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* WebSocket Server
|
|
81
|
-
* @param {SocketServerOptions} options - Configuration options for SocketServer.
|
|
82
|
-
* @return {Object} WebSocket server instance.
|
|
83
|
-
*/
|
|
84
|
-
function SocketServer(options = {}) {
|
|
85
|
-
const server = http.createServer();
|
|
86
|
-
BaseSocketServer.call(this, server, options);
|
|
87
|
-
server.listen(this.port, () => console.log(`RedWeb SocketServer listening on port ${this.port}`));
|
|
88
|
-
return this;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Secure WebSocket Server
|
|
93
|
-
* @param {SocketServerOptions} options - Configuration options for SecureSocketServer.
|
|
94
|
-
* @return {Object} WebSocket server instance.
|
|
95
|
-
*/
|
|
96
|
-
function SecureSocketServer(options = {}) {
|
|
97
|
-
const sslOptions = loadSslConfig(options.ssl);
|
|
98
|
-
const server = https.createServer(sslOptions);
|
|
99
|
-
BaseSocketServer.call(this, server, options);
|
|
100
|
-
server.listen(this.port, () => console.log(`RedWeb SecureSocketServer listening on port ${this.port}`));
|
|
101
|
-
return this;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
module.exports = {
|
|
105
|
-
SocketServer,
|
|
106
|
-
SecureSocketServer,
|
|
107
|
-
SOCKET_OPTIONS
|
|
108
|
-
};
|
|
File without changes
|