| 413 | public path(): string; |
| 414 | public path(v?: string): this | string; |
| 415 | public path(v?: string): this | string { |
| 416 | if (!arguments.length) return this._path; |
| 417 | |
| 418 | this._path = v!.replace(/\/$/, ""); |
| 419 | |
| 420 | const escapedPath = this._path.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"); |
| 421 | this.clientPathRegex = new RegExp( |
| 422 | "^" + |
| 423 | escapedPath + |
| 424 | "/socket\\.io(\\.msgpack|\\.esm)?(\\.min)?\\.js(\\.map)?(?:\\?|$)", |
| 425 | ); |
| 426 | return this; |
| 427 | } |
| 428 | |
| 429 | /** |
| 430 | * Set the delay after which a client without namespace is closed |