Alo Sarv
lead developer

Donate via
MoneyBookers

Latest Builds

version 0.3
tar.gz tar.bz2
Boost 1.33.1 Headers
MLDonkey Downloads Import Module Development
Payment completed
Development in progress.
Developer's Diary
irc.hydranode.com/#hydranode

Saturday, March 05, 2005

More UDP stuff; ref-counted Hash; LowID support fixed

Today wasn't very productive day ... all day been like a fog in my head, no progress in any direction ... though, in the end, I did manage to get some stuff done, despite all that...

Implemented 5 UDP-related packets parsing, namely, ReaskFilePing, ReaskAck, QueueFull, FileNotFound and PortTest. The latter isn't exactly ed2k protocol, it's simply used to test ports (e.g. eMule porttest on their website), but I figured I'll implement it anyway while at it. The rest are now being parsed, but on the handling side, it's still somewhat foggy and needs more work.

Also - LowID should now be fully supported - there were some issues regarding it (bug #12), but it got fixed. Also, we had login timeout at 3s (to create fast logins), but with LowID, you need at least 30s timeout apparently before the server assigns you LowID, so now the login-time out is 30s.

Upload/Download speed limits are now user-configurable from preferences file. The keys are in section [/], UpSpeedLimit and DownSpeedLimit. (Keys are created during first configuration save automatically). Ofcourse we follow ed2k-rules for download-speedlimits when upload limit is set < 10kb - in which case, download limit will be set to upspeed * 3.

On other topic, I played around with Hash class abit, and replaced the implementation to use reference-counted data. The thing is, essencially, nearly all Hash objects in the app are copies of each other, so this is a major memory-saver - I don't have full test results back yet, but I estimate 20-40% long-term memory usage drop. This might increase as the hashes get longer - currently we only have 16-byte-hashes in use, but think what happens when dealing with SHA1, SHA256 or SHA512 hashes :) At first it seemed to me that it caused slight increase in CPU usage, however, additional tests showed that we were running at ~3.3% CPU usage even before this update, so it's all good. Note that after turning trace code off, we drop down to around 1.5% CPU usage, with possibly more drop when optimizations are turned on.

Madcat, ZzZz



Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?