mirror of
https://github.com/amark/gun.git
synced 2025-06-04 13:16:44 +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.