Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJames Halliday <mail@substack.net>2016-03-25 04:10:17 +0300
committerJames Halliday <mail@substack.net>2016-03-25 04:10:17 +0300
commitb27922d11dfee0e669e3784c6d8cffe9c1166426 (patch)
tree59a792100a754e37d24455bebf3897540d4d3499 /docs
parentd3949564e5e68e7d527354402f164ea819059450 (diff)
provide the torrent instance in the opts.store() options
Diffstat (limited to 'docs')
-rw-r--r--docs/api.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/api.md b/docs/api.md
index 3a06171..94cb519 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -63,6 +63,13 @@ If you want access to the torrent object immediately in order to listen to event
metadata is fetched from the network, then use the return value of `client.add`. If you
just want the file data, then use `ontorrent` or the 'torrent' event.
+If you provide `opts.store`, it will be called as
+`opts.store(chunkLength, storeOpts)` with:
+
+* `storeOpts.length` - size of all the files in the torrent
+* `storeOpts.files` - an array of torrent file objects
+* `storeOpts.torrent` - the torrent instance being stored
+
## `client.seed(input, [opts], [function onseed (torrent) {}])`
Start seeding a new torrent.