* Builds the `handshake` BC object * * @private
(auth: object)
| 199 | * @private |
| 200 | */ |
| 201 | private buildHandshake(auth: object): Handshake { |
| 202 | return { |
| 203 | headers: this.request?.headers || {}, |
| 204 | time: new Date() + "", |
| 205 | address: this.conn.remoteAddress, |
| 206 | xdomain: !!this.request?.headers.origin, |
| 207 | // @ts-ignore |
| 208 | secure: !this.request || !!this.request.connection.encrypted, |
| 209 | issued: +new Date(), |
| 210 | url: this.request?.url!, |
| 211 | // @ts-ignore |
| 212 | query: this.request?._query || {}, |
| 213 | auth, |
| 214 | }; |
| 215 | } |
| 216 | |
| 217 | /** |
| 218 | * Emits to this client. |