From 418e996b8191e5a98891c5a0794d4dea9e2d9698 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Sun, 18 May 2014 17:58:03 -0700 Subject: [PATCH] add tracker server jsdoc comment --- index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/index.js b/index.js index 0f4d40c..55cd368 100644 --- a/index.js +++ b/index.js @@ -453,6 +453,20 @@ Client.prototype.setInterval = function (intervalMs) { inherits(Server, EventEmitter) +/** + * A BitTorrent tracker server. + * + * A "BitTorrent tracker" is an HTTP service which responds to GET requests from + * BitTorrent clients. The requests include metrics from clients that help the tracker + * keep overall statistics about the torrent. The response includes a peer list that + * helps the client participate in the torrent. + * + * @param {Object} opts options + * @param {Number} opts.interval interval in ms that clients should announce on + * @param {Number} opts.trustProxy Trust 'x-forwarded-for' header from reverse proxy + * @param {boolean} opts.http Start an http server? (default: true) + * @param {boolean} opts.udp Start a udp server? (default: true) + */ function Server (opts) { var self = this if (!(self instanceof Server)) return new Server(opts)