MCPcopy
hub / github.com/socketio/socket.io / buildHandshake

Method buildHandshake

packages/socket.io/lib/socket.ts:201–215  ·  view source on GitHub ↗

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

(auth: object)

Source from the content-addressed store, hash-verified

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.

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected