@hastehaul/common 2.0.12 → 2.0.15
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): void;
|
23
|
+
connect(httpServer: http.Server, path?: string): void;
|
24
24
|
}
|
25
25
|
/**
|
26
26
|
* Singleton instance of the SocketWrapper class to provide a centralized Socket.IO server connection.
|
@@ -24,9 +24,9 @@ class SocketWrapper {
|
|
24
24
|
*
|
25
25
|
* @param {http.Server} httpServer - The HTTP server instance to attach Socket.IO to.
|
26
26
|
*/
|
27
|
-
connect(httpServer) {
|
27
|
+
connect(httpServer, path) {
|
28
28
|
this._io = new socket_io_1.Server(httpServer, {
|
29
|
-
path:
|
29
|
+
path: `/${path ? path + '/' : ''}socket/`,
|
30
30
|
pingTimeout: 30000,
|
31
31
|
pingInterval: 25000,
|
32
32
|
cors: {
|