@eleven-am/pondsocket-nest 0.0.108 → 0.0.110
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/package.json +2 -2
- package/services/pondSocket.js +3 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eleven-am/pondsocket-nest",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.110",
|
|
4
4
|
"description": "PondSocket is a fast simple socket server",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"socket",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"pipeline": "npm run build && npm run push"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@eleven-am/pondsocket": "^0.1.
|
|
31
|
+
"@eleven-am/pondsocket": "^0.1.197",
|
|
32
32
|
"@golevelup/nestjs-discovery": "^4.0.3"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
package/services/pondSocket.js
CHANGED
|
@@ -16,7 +16,6 @@ exports.PondSocketService = void 0;
|
|
|
16
16
|
const pondsocket_1 = __importDefault(require("@eleven-am/pondsocket"));
|
|
17
17
|
// eslint-disable-next-line import/no-unresolved
|
|
18
18
|
const common_1 = require("@nestjs/common");
|
|
19
|
-
const http_1 = require("http");
|
|
20
19
|
const constants_1 = require("../constants");
|
|
21
20
|
const channel_1 = require("../managers/channel");
|
|
22
21
|
const channelInstance_1 = require("../managers/channelInstance");
|
|
@@ -41,17 +40,13 @@ class PondSocketService {
|
|
|
41
40
|
}
|
|
42
41
|
init(httpAdapter) {
|
|
43
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
-
const
|
|
45
|
-
const app = httpAdapter.getInstance();
|
|
46
|
-
const server = (0, http_1.createServer)(app);
|
|
43
|
+
const instances = yield this.getGroupedInstances();
|
|
47
44
|
const socket = new pondsocket_1.default({
|
|
48
|
-
server,
|
|
49
45
|
redisOptions: this.redisOptions,
|
|
46
|
+
server: httpAdapter.getHttpServer(),
|
|
50
47
|
exclusiveServer: this.isExclusiveSocketServer,
|
|
51
48
|
});
|
|
52
|
-
|
|
53
|
-
this.manageEndpoint(socket, groupedInstance);
|
|
54
|
-
});
|
|
49
|
+
instances.forEach((instance) => this.manageEndpoint(socket, instance));
|
|
55
50
|
httpAdapter.listen = (...args) => socket.listen(...args);
|
|
56
51
|
});
|
|
57
52
|
}
|