MCPcopy Index your code
hub / github.com/socketio/socket.io / buildHandshake

Method buildHandshake

lib/socket.ts:294–308  ·  view source on GitHub ↗

* Builds the `handshake` BC object * * @private

(auth: object)

Source from the content-addressed store, hash-verified

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.

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected