@hastehaul/common 2.0.51 → 2.0.52
Sign up to get free protection for your applications and to get access to all the features.
@@ -20,7 +20,7 @@ export declare class SocketWrapper {
|
|
20
20
|
*
|
21
21
|
* @param {http.Server} httpServer - The HTTP server instance to attach Socket.IO to.
|
22
22
|
*/
|
23
|
-
connect(httpServer: http.Server, path?: string): Promise<void>;
|
23
|
+
connect(httpServer: http.Server, path?: string, adapter?: any): Promise<void>;
|
24
24
|
}
|
25
25
|
/**
|
26
26
|
* Singleton instance of the SocketWrapper class to provide a centralized Socket.IO server connection.
|
@@ -33,10 +33,11 @@ class SocketWrapper {
|
|
33
33
|
*
|
34
34
|
* @param {http.Server} httpServer - The HTTP server instance to attach Socket.IO to.
|
35
35
|
*/
|
36
|
-
connect(httpServer, path) {
|
36
|
+
connect(httpServer, path, adapter) {
|
37
37
|
return __awaiter(this, void 0, void 0, function* () {
|
38
38
|
return new Promise((resolve, reject) => {
|
39
39
|
this._io = new socket_io_1.Server(httpServer, {
|
40
|
+
adapter: adapter,
|
40
41
|
path: `/${path ? path + '/' : ''}socket/`,
|
41
42
|
pingTimeout: 30000,
|
42
43
|
pingInterval: 25000,
|