mirror of
https://github.com/amark/gun.git
synced 2026-03-09 18:33:10 +00:00
The Peer "class" now extends EventEmitter. Listening to any websocket events (e.g., "message", "close", "open", etc.) will not only subscribe to the current websocket, but all future websockets. This provides a much needed abstraction, since reconnection replaces the socket, which would typically destroy your listeners.