MCPcopy Index your code

hub / github.com/webtorrent/webtorrent / functions

Functions252 in github.com/webtorrent/webtorrent

↓ 151 callersMethoddestroy
(err)
lib/peer.js:231
↓ 105 callersMethodadd
* Start downloading a new torrent. Aliased as `client.download`. * @param {string|Buffer|Object} torrentId * @param {import('./lib/torrent.js').
index.js:260
↓ 45 callersMethod_debug
(...args)
lib/torrent.js:2091
↓ 43 callersMethodaddress
()
index.js:428
↓ 37 callersMethodseed
* Start seeding a new file/folder. * @param {string|File|FileList|Buffer|Array.<string|File|Buffer>} input * @param {Object=} opts * @param
index.js:307
↓ 36 callersMethodget
@param {number} index
lib/selections.js:130
↓ 28 callersMethodclose
(cb = () => {})
lib/server.js:246
↓ 27 callersMethodlisten
(...args)
lib/server.js:313
↓ 26 callersMethodremove
* Remove a torrent from the client. * @param {string|Buffer|Torrent} torrentId * @param {function} cb
index.js:406
↓ 22 callersFunctionassertBlocked
(t, torrent, addr)
test/node/blocklist.js:8
↓ 20 callersMethodaddPeer
(peer, source)
lib/torrent.js:1036
↓ 19 callersMethodincludes
(piece)
lib/file.js:183
↓ 18 callersMethodcreateServer
* Creates an http server to serve the contents of this torrent, * dynamically fetching the needed torrent pieces to satisfy http requests. * Ran
index.js:196
↓ 16 callersMethodarrayBuffer
(opts = {})
lib/file.js:131
↓ 15 callersMethoddestroy
(opts, cb)
lib/torrent.js:947
↓ 14 callersMethoddestroy
* Destroy the client, including all torrents and connections to peers. * @param {function} cb
index.js:465
↓ 14 callersMethodgetRarestPiece
* Get the index of the rarest piece. Optionally, pass a filter function to exclude * certain pieces (for instance, those that we already have).
lib/rarity-map.js:36
↓ 13 callersMethodcreateReadStream
(opts)
lib/file.js:118
↓ 12 callersFunctionassertReachable
(t, torrent, addr)
test/node/blocklist.js:15
↓ 12 callersMethodload
(streams, cb)
lib/torrent.js:2060
↓ 9 callersMethod_destroy
(err, opts, cb)
lib/torrent.js:953
↓ 9 callersMethod_update
* Heartbeat to update all peers and their requests.
lib/torrent.js:1580
↓ 8 callersMethod_destroy
(err, cb)
index.js:470
↓ 8 callersMethodinsert
* @param {SelectionItem & NotificationItem} newItem
lib/selections.js:112
↓ 8 callersFunctionmaybeDone
()
test/node/seed-while-download.js:51
↓ 8 callersMethodselect
(priority)
lib/file.js:87
↓ 7 callersMethod_debug
()
index.js:540
↓ 7 callersMethod_updateWireInterest
(wire)
lib/torrent.js:1564
↓ 7 callersMethoddeselect
()
lib/file.js:92
↓ 7 callersMethoddownloadSpeed
()
lib/torrent.js:245
↓ 7 callersMethodrecalculate
* Recalculates piece availability across all peers in the torrent.
lib/rarity-map.js:91
↓ 7 callersFunctionrunTransferTest
(t, seederLevel, downloaderLevel, expectedMethod)
test/node/encryption.js:19
↓ 7 callersFunctionsetupClient
({ t, onTorrent, onIdle, addTorrentProps = {} })
test/node/client-deselect.js:6
↓ 7 callersFunctiontoString
* Converts a selection or an array of selections to a human-readable string * @param {{from: number, to: number} | Array<{from: number, to: number}>}
test/selections.js:103
↓ 6 callersFunctionassertList
(t, torrent)
test/node/blocklist.js:77
↓ 6 callersFunctioncreateServer
(data, cb)
test/node/download-metadata.js:7
↓ 6 callersMethoddestroy
(cb = () => {})
lib/server.js:255
↓ 5 callersMethod_onListening
()
lib/torrent.js:367
↓ 5 callersMethod_request
* Attempts to request a block from the given wire.
lib/torrent.js:1923
↓ 5 callersMethodaddress
()
lib/server.js:309
↓ 5 callersMethodclear
()
lib/selections.js:140
↓ 5 callersMethodhandshake
()
lib/peer.js:199
↓ 5 callersFunctionmaybeDone
(err)
test/node/download-dht-torrent.js:69
↓ 5 callersMethodonConnect
* Called once the peer is connected (i.e. fired 'connect' event) * @param {Socket} conn
lib/peer.js:64
↓ 4 callersMethod_checkDone
()
lib/torrent.js:2023
↓ 4 callersMethod_onWire
(wire, addr)
lib/torrent.js:1290
↓ 4 callersMethod_updateSelections
* Called on selection changes.
lib/torrent.js:1516
↓ 4 callersMethod_verifyPiecesUsingHash
* Verifies the pieces of the torrent using hashing ( it can be very slow ) * @param {Array<number>} pieces * @param {callbackWithError} cb *
lib/torrent.js:805
↓ 4 callersFunctioncleanup
()
lib/worker-server.js:44
↓ 4 callersFunctioncleanup
()
lib/peer.js:290
↓ 4 callersFunctiongetPageHTML
(title, pageHtml)
lib/server.js:425
↓ 4 callersFunctionmaybeDone
()
test/node/download-dht-magnet.js:64
↓ 4 callersFunctionmaybeDone
()
test/node/download-webseed-magnet.js:36
↓ 4 callersFunctionmaybeDone
()
test/node/download-tracker-magnet.js:85
↓ 4 callersFunctionmaybeDone
()
test/node/blocklist-dht.js:57
↓ 4 callersFunctionsetPiece
(wire, index)
test/rarity-map.js:104
↓ 4 callersMethodsort
@param {(a: SelectionItem, b: SelectionItem) => number} sortFn
lib/selections.js:121
↓ 4 callersFunctiontestSpeed
(t, downloaderOpts, uploaderOpts, cb)
test/node/limit-methods.js:9
↓ 4 callersFunctiontestSpeed
(t, downloaderOpts, uploaderOpts, cb)
test/node/limit-download-upload.js:9
↓ 3 callersMethod_addPeer
(peer, type, source)
lib/torrent.js:1076
↓ 3 callersMethod_drain
* Pop a peer off the FIFO queue and connect to it. When _drain() gets called, * the queue will usually have only one peer in it, except when there
lib/torrent.js:2102
↓ 3 callersMethod_markAllVerified
* Mark the entire torrent as verified ( i.e. fully downloaded ) * @private
lib/torrent.js:861
↓ 3 callersMethod_markVerified
* Mark one piece as verified * @param {number} index * @private
lib/torrent.js:872
↓ 3 callersMethod_onMetadata
* Called when the full torrent metadata is received.
lib/torrent.js:555
↓ 3 callersMethod_onStore
* Called when the metadata, listening server, and underlying chunk store is initialized.
lib/torrent.js:921
↓ 3 callersMethod_registerPeer
* @param {Peer} newPeer
lib/torrent.js:1183
↓ 3 callersFunctionassertArrayContentsEqual
* Asserts that the given arrays of selections have the same from-to pairs, regardless of order * @param {import('tape').Test} t * @param {Array<Sele
test/selections.js:117
↓ 3 callersMethodcancel
()
lib/file.js:167
↓ 3 callersMethoddestroy
* Destroy this Conn pool. * @param {function} cb
lib/conn-pool.js:81
↓ 3 callersMethoddestroy
(cb = _ => {}, err)
lib/file-iterator.js:103
↓ 3 callersFunctiongetBlockPipelineLength
(wire, duration)
lib/torrent.js:2207
↓ 3 callersFunctiongetPiecePipelineLength
(wire, duration, pieceLength)
lib/torrent.js:2221
↓ 3 callersFunctionisCoveringExisting
(newItem, existing)
lib/selections.js:205
↓ 3 callersFunctionisInsideExisting
(newItem, existing)
lib/selections.js:191
↓ 3 callersFunctionisLowerIntersecting
(newItem, existing)
lib/selections.js:167
↓ 3 callersFunctionisUpperIntersecting
(newItem, existing)
lib/selections.js:179
↓ 3 callersFunctionmagnetDownloadTest
(t, serverType)
test/node/download-tracker-magnet.js:27
↓ 3 callersMethodremove
* @param {MinimalSelectionItem & {isStreamSelection?: boolean}} item Interval to be removed from the selection
lib/selections.js:28
↓ 3 callersMethodremovePeer
(peer)
lib/torrent.js:1219
↓ 3 callersMethodreturn
* @returns {Promise<IteratorResult<Uint8Array>>}
lib/file-iterator.js:90
↓ 3 callersMethodselect
(start, end, priority, notify)
lib/torrent.js:1260
↓ 3 callersFunctionserve
({ request })
lib/worker-server.js:20
↓ 3 callersMethodserve404Page
(res)
lib/server.js:64
↓ 3 callersFunctiontorrentDownloadTest
(t, serverType)
test/node/download-tracker-torrent.js:27
↓ 2 callersMethod_addIncomingPeer
* Called whenever a new incoming TCP peer connects to this torrent swarm. Called with a * peer that has already sent a handshake.
lib/torrent.js:1171
↓ 2 callersMethod_cleanupWireEvents
(wire)
lib/rarity-map.js:101
↓ 2 callersMethod_deselect
(from, to, isStreamSelection = false)
lib/torrent.js:1264
↓ 2 callersMethod_gcSelections
* Garbage collect selections with respect to the store's current state.
lib/torrent.js:1529
↓ 2 callersMethod_hasMorePieces
(threshold)
lib/torrent.js:907
↓ 2 callersMethod_initWire
(wire)
lib/rarity-map.js:74
↓ 2 callersMethod_isIPv4
* Return `true` if string is a valid IPv4 address. * @param {string} addr * @return {boolean}
lib/torrent.js:2201
↓ 2 callersMethod_onConnection
* On incoming connections, we expect the remote peer to send a handshake first. Based * on the infoHash in that handshake, route the peer to the ri
lib/conn-pool.js:124
↓ 2 callersMethod_onParsedTorrent
(parsedTorrent)
lib/torrent.js:297
↓ 2 callersMethod_onTorrentId
* Parse a torrent from its magnet/torrent file/remote url and kickstart downloading it * @param {string|ArrayBufferView|Object} torrentId * @ret
lib/torrent.js:273
↓ 2 callersMethod_onWireWithMetadata
* @param {import('bittorrent-protocol').default} wire
lib/torrent.js:1397
↓ 2 callersMethod_processParsedTorrent
(parsedTorrent)
lib/torrent.js:329
↓ 2 callersMethod_remove
(torrent, opts, cb)
index.js:415
↓ 2 callersMethod_select
(start = 0, end = this.pieces.length - 1, priority, notify, isStreamSelection = false)
lib/torrent.js:1236
↓ 2 callersMethod_startDiscovery
()
lib/torrent.js:380
↓ 2 callersMethod_updateInterest
* Update interested status for all peers.
lib/torrent.js:1553
next →1–100 of 252, ranked by callers