Websocket with Bun
I've tried everything but I can't get WebSockets to work with Bun, also the git issues were not helpful, does anyone have an idea ?
2 Replies
There is a bug in this if you are returning the fetch it does not allow Bun to switch protocols. If you don't get the ip and do:
It will work. When the IP trick was added to the docs, web sockets we're not considered. You should be able to follow what is on Bun documentation to make this work https://bun.sh/guides/websocket/simple
I can't seem to find any workaround than making breaking changes to WebSocket. I will open an issue on this
@Abanob Boles this has been fixed in the latest version, there is now a helper for getting the client ip