| 343 | public path(): string; |
| 344 | public path(v?: string): this | string; |
| 345 | public path(v?: string): this | string { |
| 346 | if (!arguments.length) return this._path; |
| 347 | |
| 348 | this._path = v!.replace(/\/$/, ""); |
| 349 | |
| 350 | const escapedPath = this._path.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"); |
| 351 | this.clientPathRegex = new RegExp( |
| 352 | "^" + |
| 353 | escapedPath + |
| 354 | "/socket\\.io(\\.msgpack|\\.esm)?(\\.min)?\\.js(\\.map)?(?:\\?|$)" |
| 355 | ); |
| 356 | return this; |
| 357 | } |
| 358 | |
| 359 | /** |
| 360 | * Set the delay after which a client without namespace is closed |