NMDC: after downloading

Technical discussion about the NMDC and <a href="http://dcpp.net/ADC.html">ADC</A> protocol. The NMDC protocol is documented in the <a href="http://dcpp.net/wiki/">Wiki</a>, so feel free to refer to it.

Moderator: Moderators

Locked
ptomaine
Posts: 2
Joined: 2006-08-07 14:49

NMDC: after downloading

Post by ptomaine » 2006-08-07 15:15

Ok, one client sends

Code: Select all

$Get SomeFile$1|
The other replies with

Code: Select all

$FileLength 1024|
The first sends

Code: Select all

$Send|
The second now sends 1024 bytes of data. The first one receives it.
What must/should/can happen after that? Close the connection or can I send another $Get command?

Quattro
Posts: 166
Joined: 2006-01-11 09:23

Post by Quattro » 2006-08-07 15:57

i would think there should be some kind of ack to tell the sender the 1024 bytes have arrived...
after that it should be possible to send another $get command...
but check the DC protocol wiki to check http://dcpp.net/wiki/index.php/NMDC_Cli ... t_Protocol

i checked myself... there's no ack and the connection can be dropped after this...
DC++ protocol wiki wrote:Peer 2

$Send|

Peer 1

<<raw>>

Connection can be dropped at that point. You know the file is done when you have 220057 bytes of raw data.
after that you should start over i think with the whole bunch like
DC++ protocol wiki wrote: Peer 1

$MyNick peer1|$Lock EXTENDEDPROTOCOLABCABCABCABCABCABC Pk=DCPLUSPLUS0.668ABCABC|

Peer 2

$MyNick peer2|$Lock EXTENDEDPROTOCOLABCABCABCABCABCABC Pk=DCPLUSPLUS0.668ABCABC|$Supports MiniSlots XmlBZList ADCGet TTHL TTHF GetZBlock ZLIG |$Direction Download 17762|$Key ........A .....0.0. 0. 0. 0. 0. 0.|

Peer 1

$Supports MiniSlots XmlBZList ADCGet TTHL TTHF GetZBlock ZLIG |$Direction Upload 6494|$Key ........A .....0.0. 0. 0. 0. 0. 0.|

Peer 2

$Get files.xml.bz2$1|

Peer 1

$FileLength 220057|

Peer 2

$Send|

Peer 1

<<raw>>
You can send a message around the world in 1/7 of a second; yet it may take several years to move a simple idea through a 1/4 inch of human skull.

ptomaine
Posts: 2
Joined: 2006-08-07 14:49

Post by ptomaine » 2006-08-08 13:27

So, I must send $ConnectToMe again?

ivulfusbar
Posts: 506
Joined: 2003-01-03 07:33

Post by ivulfusbar » 2006-08-09 00:05

No, basicly, the uploading client waits for a timeout on the socket. I.e., lets the downloading client send something new, like initiating a a new $Get within a minute or whatever time-period you find satisfactory.

If nothing happens, then you disconnect.
Everyone is supposed to download from the hubs, - I don´t know why, but I never do anymore.

Quattro
Posts: 166
Joined: 2006-01-11 09:23

Post by Quattro » 2006-08-09 04:38

okay thanks, wasn't sure about that last part anyway, I learn something new every day ^^
You can send a message around the world in 1/7 of a second; yet it may take several years to move a simple idea through a 1/4 inch of human skull.

Locked