3 ms·
The WebSocket API is very simple, there wouldn't be much need to abstract it.
by TazeTSchnitzel 15y ago
The WebSocket API is very simple, there wouldn't be much need to abstract it.
- leggetter 15y agoThe point in abstraction in this case is to add additional functionality. The most obvious option, and something I thought might have become part of the WebSocket API, is auto-reconnection. To reconnect you need to create another WebSocket object and reattach all your event listeners. So, I'm convinced that the majority of people who use WebSockets will have to write their own custom code for this and will probably put it in their own little library which wraps around using WebSocket objects. More info in the comment here: http://www.sitepoint.com/websockets-stable-and-ready-for-developers/#comment-1043114 http://www.sitepoint.com/websockets-stable-and-ready-for-dev...