You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Seems like the "initial_headers" (and also "headers") event is never emitted when using Socket.IO with uWebSockets. Need a way to attach headers to the http handshake response.
To Reproduce
socket.io v4.8.1
uWebSockets.js v20.51.0
Server
server.mjs
import { App } from "uWebSockets.js";
import { Server } from "socket.io";
const app = new App();
const io = new Server({
serveClient: false,
transports: ["websocket"],
});
io.attachApp(app);
io.engine.on("initial_headers", (headers, req) => {
console.log("initial headers event emitted");
});
io.on("connection", (socket) => {
console.log("connected");
});
app.listen(3000, (token) => {
if (token) {
console.log("Server listening on port 3000");
} else {
console.log("Failed to listen on port 3000");
}
});
Describe the bug
Seems like the "initial_headers" (and also "headers") event is never emitted when using Socket.IO with uWebSockets. Need a way to attach headers to the http handshake response.
To Reproduce
socket.io v4.8.1
uWebSockets.js v20.51.0
Server
Client
Expected behavior
Expecting console to log "initial headers event emitted", but only getting "connected" and "Server listening on port 3000".
The text was updated successfully, but these errors were encountered: