From 3daee2c66cbf752b9e6e49b99492b8c1914a4a58 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 20 Apr 2016 23:10:32 -0700 Subject: BREAKING: Major cleanup ### Added - `client.listening` property to signal whether TCP server is listening for incoming connections. ### Changed - Merged `Swarm` class into `Torrent` object. Properties on `torrent.swarm` (like `torrent.swarm.wires`) now exist on `torrent` (e.g. `torrent.wires`). - `torrent.addPeer` can no longer be called before the `infoHash` event has been emitted. - Remove `torrent.on('listening')` event. Use `client.on('listening')` instead. - Remove support from `TCPPool` for listening on multiple ports. This was not used by WebTorrent and just added complexity. There is now a single `TCPPool` instance for the whole WebTorrent client. - Deprecate: Do not use `client.download()` anymore. Use `client.add()` instead. - Deprecate: Do not use `torrent.swarm` anymore. Use `torrent` instead. ### Fixed - When there is a `torrent.on('error')` listener, don't also emit `client.on('error')`. - Do not return existing torrent object when duplicate torrent is added. Fire an `'error'` event instead. - Memory leak of `Torrent` object caused by `RarityMap` - Memory leak of `Torrent` object caused by `TCPPool` - `client.ratio` and `torrent.ratio` are now calculated as `uploaded / received` instead of `uploaded / downloaded`. --- CHANGELOG.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 CHANGELOG.md (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..918653e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,41 @@ +# WebTorrent Version History + +## UNRELEASED + +### Added + +- `client.listening` property to signal whether TCP server is listening for incoming + connections. + +### Changed + +- Merged `Swarm` class into `Torrent` object. Properties on `torrent.swarm` (like + `torrent.swarm.wires`) now exist on `torrent` (e.g. `torrent.wires`). + +- `torrent.addPeer` can no longer be called before the `infoHash` event has been + emitted. + +- Remove `torrent.on('listening')` event. Use `client.on('listening')` instead. + +- Remove support from `TCPPool` for listening on multiple ports. This was not used by + WebTorrent and just added complexity. There is now a single `TCPPool` instance for the + whole WebTorrent client. + +- Deprecate: Do not use `client.download()` anymore. Use `client.add()` instead. + +- Deprecate: Do not use `torrent.swarm` anymore. Use `torrent` instead. + +### Fixed + +- When there is a `torrent.on('error')` listener, don't also emit + `client.on('error')`. + +- Do not return existing torrent object when duplicate torrent is added. Fire an + `'error'` event instead. + +- Memory leak of `Torrent` object caused by `RarityMap` + +- Memory leak of `Torrent` object caused by `TCPPool` + +- `client.ratio` and `torrent.ratio` are now calculated as `uploaded / received` instead + of `uploaded / downloaded`. -- cgit v1.2.3