DC Protocol HELP

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
Sid
Posts: 56
Joined: 2003-01-07 18:13
Contact:

DC Protocol HELP

Post by Sid » 2003-01-07 18:19

I have been working with the dc protocol and i have had an eazy time with it except when it comes down to the Client To Client Protocal. I cant seem to figure it out. i send the connecttome command correctly and the other client conects to me but here is where the trouble starts. Am i sapose to send a cmd befor the other client sends the mynick and lock cmd?? also what the hell is that number after the Direction command. one more thing the direction command keeps coming up as Download and i am sapose to be uploading my list. i fallowed the example provided in the suxxx documentation and ended up downloading the other clients list not uploading mine to him. PLEASE HELP this is driving me nutz!

Thanks
Sid
[email protected]

Sid
Posts: 56
Joined: 2003-01-07 18:13
Contact:

P.S.

Post by Sid » 2003-01-07 18:21

This is as far as i got.

i am CL1

CL2: $MyNick <nickname>
CL2: $Lock <lockcode>
CL1: $Key <keycode>
CL1: $Lock <lockcode>
CL2: $Key <keycode>
CL1: $MyNick <nickname>

CL2: $Direction <direction> <anumber>

After CL2 sends the direction (in this case Download) i send back "$Direction Upload 711".

This is where CL2 disconnects without warning

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

Post by ivulfusbar » 2003-01-07 18:41

first of all, log what dc++ or nmdc send in client-2-client and don't read to much what suxx has written. this can be done by a simple bouncer with logging capabilities.

I don't remember what.. but if i remember correct suxx version isn't completely perfect.. can comment that later.. i have to goto sleep now.
Everyone is supposed to download from the hubs, - I don´t know why, but I never do anymore.

Sid
Posts: 56
Joined: 2003-01-07 18:13
Contact:

hmmm

Post by Sid » 2003-01-07 22:49

still no luck

aDe
Forum Moderator
Posts: 138
Joined: 2003-01-07 09:14
Location: SE
Contact:

Post by aDe » 2003-01-08 14:34

Code: Select all

Client <-> Client Communication in DC. 2002-11-05. By aDe
----------------------------------------------------------


ACTIVE FILE DOWNLOAD
----------------------
D = downloader
U = uploader
H = hub

D>H: $ConnectToMe <U's username> <D's IP and port>|
H>U: $ConnectToMe <U's username> <D's IP and port>|
U>D: Connection
U>D: $MyNick <U's nick>|$Lock <new lock with pk>|
D>U: $MyNick <D's nick>|$Lock <new lock with pk>|$Direction Download <unknown number>|$Key <key for U's lock>|
U>D: $Key <key for D's lock>|
D>U: $Get <filepath&filename in exact case>$<start at byte (1=beginning of file)>|
U>D: $FileLength <length of the requested file>|
D>U: $Send|
U>D: Data, in many chunks.
D>U: $Send|       <- when 40906 bytes are sent, ask for more
maybe this is not exactly what you are looking for but it might help.. this method has been tested and works with nmdc and dc++

Sphinx
Posts: 1
Joined: 2003-01-08 06:41

Post by Sphinx » 2003-01-09 06:43

If I remember correct:

Code: Select all

<unknown number>
Random number, when both clients want to start download then one with higher number starts first.

arnetheduck
The Creator Himself
Posts: 296
Joined: 2003-01-02 17:15

Post by arnetheduck » 2003-01-09 09:52

[quote="aDe"]

Code: Select all

...
D>U: $Send|
U>D: Data, in many chunks.
D>U: $Send|       <- when 40906 bytes are sent, ask for more
what's this? never heard of any chunks, and dc++ certainly doesn't "$send" every 40906 bytes...that's the largest waste of time and resources I've ever seen? and it annoyed me to no end that the receiver is sending stuff during the send (because then you have to check the socket for reading while writing as well...

aDe
Forum Moderator
Posts: 138
Joined: 2003-01-07 09:14
Location: SE
Contact:

Post by aDe » 2003-01-09 10:18

hmm well, it worked for me, with VB winsock controls, i get many parts of data ("chunks" or whatever word preffered) when i send $Send, and after 40960 bytes, i'd have to ask for some more, or the client wouldnt carry on sending.. atleast thats how i did it, maybe i did it wrong somehow but as mentioned, it works, with both clients

Sid
Posts: 56
Joined: 2003-01-07 18:13
Contact:

Thank You

Post by Sid » 2003-01-09 13:45

I would like to thank everyone for there help on this topic. It has given me more insite into the workings of the DC protocol. I have been able to get everything to work with the DC++ Client (probably because it is a very good client) but the nmbc client refuses to work correctly! I dont see how there is a difference but apperently there is. The probably is spacificly in the upload from my new client of the FileList (MyList.DcLst).

If any one has any insite please continue to share it. Thanks Sid.

P.S. Anyone Working On an improved DC protocol? The current one seems to be a bit weak.

ender
Posts: 224
Joined: 2003-01-03 17:47

Post by ender » 2003-01-09 14:30

You can't change the protocol without having an option to use the old protocol... There are a few improvements planned, but only in the client-hub protocol, not client-client.

Sid
Posts: 56
Joined: 2003-01-07 18:13
Contact:

Difference Between DC++ And NMDC

Post by Sid » 2003-01-14 00:13

What is the difference when requesting a download from nmDC and DC++ im able to download fine form NMDC but DC++ Gets stuck with the list. any ideas

aDe
Forum Moderator
Posts: 138
Joined: 2003-01-07 09:14
Location: SE
Contact:

Post by aDe » 2003-01-14 03:08

i think the is a difference in the file list when built nmdc includes the : letter when sharing a drive, but dc++ not, or the other way around.. also make sure the case is right.. otherwise there should not be any difference in the get part..

Locked