socket.io icon indicating copy to clipboard operation
socket.io copied to clipboard

Allow to bind socket.io to bun built in server.

Open TomieAi opened this issue 1 year ago • 5 comments

Is your feature request related to a problem? Please describe. so I can use 1 port instead of two port separate. cant use uwebsocket.js due to bun already using it under the hood. it wont compile. and yes im aware that socket.io uses built in ws.. which is bun ws.. that is uwebsocket under the hood. but im only here for one port solution.

Describe the solution you'd like i dont know io.attachApp(bun here XD);

Describe alternatives you've considered nothing really i dont know how it works.. but you guys bind the uwebsocket server it might be same as bun too.. since it uses uwebsocket under the hood. all i need is so bun server and socket io has same port.

Additional context nothing

TomieAi avatar Mar 09 '24 00:03 TomieAi

That's an interesting idea :+1: not sure how we can do this elegantly though.

Food for thoughts:

  • for the uWebSockets.js integration, we have created a new low-level server in the engine.io repository: https://github.com/socketio/engine.io/blob/main/lib/userver.ts
  • for the Deno integration, we have created a whole new repository: https://github.com/socketio/socket.io-deno

darrachequesne avatar Mar 11 '24 23:03 darrachequesne

will be nice if you guys expose it like a custom parser you guys had, but for a server. so we can easily intergrade it on anything. that has server express type like syntax.

we have to expose those needed .get, .any etc endpoints and those needed ws endpoints. open , message etc. quite like custom parser does processing message that come and go.

will be nice to finally use elysiajs(bun server/ws wrapper) with socket io compatible xD

TomieAi avatar Mar 16 '24 01:03 TomieAi

The current Deno solution is missing very useful features due to not being updated for 2 years. It would be very nice to have Deno/Bun/Winter etc engines/parsers to "attach" that don't need as much updating every time a new feature is added to the protocol/client. Maybe not a 4.x solution, but hope you all keep it in mind for 5.x. Company I work for is interested in the performance benefits of getting off Nodejs, but socket.io not having acks and connection recovery for Deno is currently a road block.

TomorrowToday avatar Jun 07 '24 21:06 TomorrowToday

Hi, need for a solution (Bun + Hono + Socket.IO). Thanks @TomieAi.

enix90s avatar Jun 07 '24 23:06 enix90s

It would be very nice to have Deno/Bun/Winter etc engines/parsers to "attach" that don't need as much updating every time a new feature is added to the protocol/client.

That's indeed on our to-do list. We'll keep you updated!

darrachequesne avatar Jun 11 '24 10:06 darrachequesne

‌‌May I ask if there any progress in support for bun? Thank you.

BANG88 avatar Jan 11 '25 05:01 BANG88

Any progress?

csulit avatar Feb 13 '25 01:02 csulit

Any update on this?

surajrimal07 avatar Mar 07 '25 11:03 surajrimal07

hmm it seem no progress yet :'(

TomieAi avatar Mar 07 '25 17:03 TomieAi

If it's useful to anyone, I've created a socket.io implementation for Bun with full support for socket.io-client. https://github.com/phederal/socket.io-bun

phederal avatar Jun 08 '25 14:06 phederal

If it's useful to anyone, I've created a socket.io implementation for Bun with full support for socket.io-client. https://github.com/phederal/socket.io-bun

you are goat leys gooo <3 thanks you

TomieAi avatar Jun 13 '25 01:06 TomieAi