Home
Home
Gallery
Browse
Profile
Profile
Forums
Forums
FAQ
FAQ
Connection

Note: You need cookies enabled to log in. failed logins in a row will result in banning your ip!

You have 6 remaining tries.

Login username
password
Register now! Register
Recover password
 

Anatomy of a torrent session

(Updated to reflect the tracker changes. 14-04-2004)

There seems to be a lot of confusion about how the statistics updates work. The following is a capture of a full session to see what's going on behind the scenes. The client communicates with the tracker via simple http GET commands. The very first in this case was:

GET /announce.php?info_hash=c%97%91%C5jG%951%BE%C7M%F9%BFa%03%F2%2C%ED%EE%0F& peer_id=S588-----gqQ8TqDeqaY&port=6882&uploaded=0&downloaded=0&left=753690875 &event=started

Let's dissect this:

info_hash is just the hash identifying the torrent in question;
peer_id, as the name suggests, identifies the client (the s588 part identifies Shad0w's 5.8.8, the rest is random);
port just tells the tracker which port the client will listen to for incoming connections;
uploaded=0; (this and the following are the relevant ones, and are self-explanatory)
downloaded=0;
left=753690875 (how much left);
event=started (telling the tracker that the client has just started).

Notice that the client IP doesn't show up here (although it can be sent by the client if it configured to do so). It's up to the tracker to see it and associate it with the user_id.
(Server replies will be omitted, they're just lists of peer ips and respective ports.)
At this stage the user's profile will be listing this torrent as being leeched.

>From now on the client will keep send GETs to the tracker. We show only the first one as an example,

GET /announce.php?info_hash=c%97%91%C5jG%951%BE%C7M%F9%BFa%03%F2%2C%ED%EE%0F& peer_id=S588-----gqQ8TqDeqaY&port=6882&uploaded=67960832&downloaded=40828928& left=715417851&numwant=0

("numwant" is how the client tells the tracker how many new peers it wants, in this case 0.)

As you can see at this stage the user had uploaded approx. 68MB and downloaded approx. 40MB. Whenever the tracker receives these GETs it updates both the stats relative to the 'currently leeching/seeding' boxes and the total user upload/download stats. These intermediate GETs will be sent either periodically (every 15 min or so, depends on the client and tracker) or when you force a manual announce in the client.

Finally, when the client was closed it sent

GET /announce.php?info_hash=c%97%91%C5jG%951%BE%C7M%F9%BFa%03%F2%2C%ED%EE%0F& peer_id=S588-----gqQ8TqDeqaY&port=6882&uploaded=754384896&downloaded=754215163 &left=0&numwant=0&event=completed

Notice the all-important "event=completed". It is at this stage that the torrent will be removed from the user's profile. If for some reason (tracker down, lost connection, bad client, crash, ...) this last GET doesn't reach the tracker this torrent will still be seen in the user profile until some tracker timeout occurs. It should be stressed that this message will be sent only when closing the client properly, not when the download is finished. (The tracker will start listing a torrent as 'currently seeding' after it receives a GET with left=0).

There's a further message that causes the torrent to be removed from the user's profile, namely"event=stopped". This is usually sent when stopping in the middle of a download, e.g. by pressing 'Cancel' in Shad0w's.

One last note: some clients have a pause/resume option. This will not send any message to the server. Do not use it as a way of updating stats more often, it just doesn't work. (Checked for Shad0w's 5.8.11 and ABC 2.6.5.)


Bored?
Hangman
Mega Casino
BlackJack
Tictac
Gallery
Map
Stats
Users179
Power Users22
Uploaders0
Moderator2
Adminstrator1
Sysop3
Disabled users 0
Warned users 0
VIP's 7
Friends

<a href="http://www.tri-tavern.com"><img src="http://www.tri-tavern.com/pic/logo.gif" border="0" alt="tri-tavern!"></a>

<a href="http://gfxnation.com/forums/cmps_index.php"><img src="http://www.gfxnation.com/images/gfxaffy.gif" alt="GFX Nation" border="0">

<center><a href="http://www.ultimategfx.com"><img src="http://www.ultimategfx.com/linktous/affiliate_button.gif" width="88" height="31" border="0" /></a></center>

ThePeerGroup.Net

<a href="http://www.phpbb.com/"><img src="pic/friends/phpbb_logo.gif" alt="PHPBB2" border="0">

<a href="http://www.p2p-irc.net/"><img src="pic/friends/p2pirc.gif" alt="P2PIRC" border="0">

<a href="http://www.apachefriends.org/en/xampp.html"><img src="pic/friends/xampp.jpg" alt="Xampp" border="0">

<a href="http://www.mysql.com/"><img src="pic/friends/mysql.png" alt="MYSQL" border="0">

<a href="http://httpd.apache.org/"><img src="pic/friends/apache.png" alt="Apache" border="0">

<a href="http://www.php.net/"><img src="pic/friends/php.png" alt="PHP" border="0">

<a href="http://www.firefox.com/in.php?id=65&"> <img src="http://firefox.com/firefox-spread-btn-1b" width="88" height="31" border="0"></a>

Last 10
LichKing4d 23:42:20 ago
Sandman29d 10:04:12 ago
abc12329d 11:43:08 ago
Phantm29d 12:17:39 ago
TEHFERRET29d 12:45:50 ago
JEFFSR29d 14:00:58 ago
smc29d 17:48:12 ago
CT29d 20:53:04 ago
c1nders29d 22:20:35 ago
elzorras30d 02:35:54 ago
Browsers
Browser Stats
of this month
18.23 %
62.07 %
0 %
0 %
0 %
0.49 %
Others 19.21 %
Links
Brian's BitTorrent FAQ and GuideµTorrent

TorrentStrike Fullymodded v1 is Powered by TBDev - iCGstation v1.0 Template by Ray © 2003, 2004 iOptional
      
Rules-Faq-Links-Credits