Hacker News new | ask | show | jobs
by Karrot_Kream 366 days ago
Websockets already have keepalives. Everything but long polling is doable in a few hours and can probably be one-shotted by an LLM. For long-polling, you can just drop down to Fetch calls.
1 comments

This is true. Just a few days ago I had Claude one-shot some WebSocket utilities for reconnect and message queueing. It took 2 minutes.

I've written countless WebSocket wrappers in the past (similar aversion to socket.io as others in this thread). The one-shot output was perfect. Certainly better than my patience would've allowed.

Maybe socket.io is doing something fancy on the server side, but for clients, it's absolutely overkill.

Maybe you could save that one-shotted code into a library of some sort...?