* Builds the `handshake` BC object * * @private
(auth: object)
| 292 | * @private |
| 293 | */ |
| 294 | private buildHandshake(auth: object): Handshake { |
| 295 | return { |
| 296 | headers: this.request?.headers || {}, |
| 297 | time: new Date() + "", |
| 298 | address: this.conn.remoteAddress, |
| 299 | xdomain: !!this.request?.headers.origin, |
| 300 | // @ts-ignore |
| 301 | secure: !this.request || !!this.request.connection.encrypted, |
| 302 | issued: +new Date(), |
| 303 | url: this.request?.url!, |
| 304 | // @ts-ignore |
| 305 | query: this.request?._query || {}, |
| 306 | auth, |
| 307 | }; |
| 308 | } |
| 309 | |
| 310 | /** |
| 311 | * Emits to this client. |