$Direction
Syntax
$Direction <direction> <number>|
Description
This command is sent as a response to $Key. It decides which party gets to download.
- <direction> is either "Upload" or "Download", the only reason to say "Upload" would be that your client does not want to download anything from your peer.
- <number> is a random number, when both clients want to download, the one with the higher number starts first. if the numbers are equal, the connection is closed.
Peculiarities
The highest <number> DC++ sends is 0x7FFF, NMDC will disconnect if it recieves a higher number.
DC++ does not send this command immediately after $Lock when an EXTENDED lock is encountered. See the $Supports.
DC++ has a bug that occurs when:
- client A has 0 free slots, client B may have free slots
- client B wants files from A, client A wants files from B
If client A tries to get something from B and it loses the random number "battle", client B doesn't get a slot because slots are full, and the status bar keeps saying "Connecting...". A patch for this is given on the discussion page. It cheats it's way out of the situation by using a high random number after it has lost, and returns to normal random when it has won.
