Open PaddeK opened 1 year ago
right now loading the real ws
server doesn't work because it relies on req.socket.write
and it implements the protocol that way, which would be a lot of work to get running on bun. the real issue is our ws implementation needs to be finished since it has alot of stubs (mainly on the server)
I agree, finishing the integrated WebSocketServer would be the prefered solution. Because the integraded solution does not support ping/pong at the moment i was searching for a fallback alternative and tried ws
after uws
is crashing due to a napi error. Is a finished integrated implementation planned for the 1.0.0 release?
What version of Bun is running?
0.6.14
What platform is your computer?
Darwin 22.5.0 x86_64 i386
What steps can reproduce the bug?
server.js:
client.js:
Running server with node results in expected behavior. Running server with bun results in client printing
custom
. In both cases client runs in node. Running client in bun shows related issue with overriden WebSocket.What is the expected behavior?
Expected is client printing
test
due tohandleProtocols
override in server.What do you see instead?
Client is printing
custom
which hints athandleProtocols
not getting called. Running client in bun results in[bun] Warning: ws.WebSocket 'upgrade' event is not implemented in bun
.Additional information
Possibly same issue was closed as fixed before #2955