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:
authorJohn Hiesey <john@hiesey.com>2021-02-27 01:37:28 +0300
committerJohn Hiesey <john@hiesey.com>2021-02-27 01:37:28 +0300
commit44426c5e3844ff265374b64a01fff8476481b8d0 (patch)
tree30d7a19baebdacb618d3e0de8f0f5ef177c9ac86 /docs
parent7a74efc60dbc8a17be4fb7324855ae49c6f78e82 (diff)
Code review fixes
Diffstat (limited to 'docs')
-rw-r--r--docs/api.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/api.md b/docs/api.md
index ad69f19..23a467b 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -348,7 +348,7 @@ The `peer` argument must be an address string in the format `12.34.56.78:4444` (
normal TCP/uTP peers), or a [`simple-peer`](https://github.com/feross/simple-peer)
instance (for WebRTC peers).
-## `torrent.addWebSeed(url)`
+## `torrent.addWebSeed(urlOrConn)`
Add a web seed to the torrent swarm. For more information on BitTorrent web seeds, see
[BEP19](http://www.bittorrent.org/beps/bep_0019.html).
@@ -356,7 +356,10 @@ Add a web seed to the torrent swarm. For more information on BitTorrent web seed
In the browser, web seed servers must have proper CORS (Cross-origin resource sharing)
headers so that data can be fetched across domain.
-The `url` argument is the web seed URL.
+The `urlOrConn` argument is either the web seed URL, or an object that provides a custom
+web seed implementation. A custom conn object is a duplex stream that speaks the bittorrent
+wire protocol and pretends to be a remote peer. It must have a `connId` property that
+uniquely identifies the custom web seed.
## `torrent.removePeer(peer)`