3 ms·
The 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 WebSoc
by leggetter 15y ago
The 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...