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

Function eioHandshake

test/support/util.ts:99–109  ·  view source on GitHub ↗
(httpServer)

Source from the content-addressed store, hash-verified

97
98// TODO: update superagent as latest release now supports promises
99export function eioHandshake(httpServer): Promise<string> {
100 return new Promise((resolve) => {
101 request(httpServer)
102 .get("/socket.io/")
103 .query({ transport: "polling", EIO: 4 })
104 .end((err, res) => {
105 const sid = JSON.parse(res.text.substring(1)).sid;
106 resolve(sid);
107 });
108 });
109}
110
111export function eioPush(httpServer, sid: string, body: string): Promise<void> {
112 return new Promise((resolve) => {

Callers 3

close.tsFile · 0.90
initFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected