3 ms·
You're talking about a light layer on top of websockets to implement a request/response protocol. This can be done pretty trivially on top of websockets in doze
by josephg 10y ago
You're talking about a light layer on top of websockets to implement a request/response protocol. This can be done pretty trivially on top of websockets in dozens of ways, though if what you want is request/response you should consider using HTTP directly.
You never have to "build it again for every project" if you put your code in npm. But I guarantee you there are dozens of libraries like this in npm already. (Just like there are dozens of libraries to do exponential reconnect backoff.)
The right approach is to build / use light layers on top of websockets to solve these problems. Socket.io is the wrong solution. Its the wrong solution for every problem.