Thoughts about the 'downloadCount' property #558
mathiascode
started this conversation in
General
Replies: 1 comment
-
|
Interesting, I hadn't given this much thought but it looks like you are right. My docs call this "the number of active user downloads" which must have been an assumption on my part. I know that the server computes a rolling average of speeds; this number might indicate the number of reported speeds that are used to compute it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I received an email from someone asking how the download count property of messages such as AddUser, JoinRoom and UserJoinedRoom is updated. Since I've previously overlooked this property, and its name is incorrect today, I'll share my response covering my findings:
I looked into the "downloadnum" property. It seems like it was introduced all the way back in 2001, and increments whenever the client sends an updated transfer speed to the server. As far as I can tell, it's some kind of internal constant used to calculate the transfer speed for a user, at least this is what Soulfind does: https://github.com/seeschloss/soulfind/blob/d6248e5dae3f8e38d1d983007f62e4cb41700b48/src/client.d#L116-L125
The "downloadnum" name seems to be a leftover from the time the server handled download speeds instead of upload speeds. I assume it incremented by sending the deprecated server code 34 (SendDownloadSpeed) to the server after each finished download, as it now increments when sending server code 121 (SendUploadSpeed) after each finished upload instead. The value also seems to decrease based on some unknown criteria, since it went down from 201 to 101 for me at one point.
I assume we should rename the property to "uploadnum" instead.
Beta Was this translation helpful? Give feedback.
All reactions