DC Protocol HELP
Moderator: Moderators
DC Protocol HELP
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]
Thanks
Sid
[email protected]
P.S.
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
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
-
- Posts: 506
- Joined: 2003-01-03 07:33
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.
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.
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
If I remember correct:
Random number, when both clients want to start download then one with higher number starts first.
Code: Select all
<unknown number>
-
- The Creator Himself
- Posts: 296
- Joined: 2003-01-02 17:15
[quote="aDe"]
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...
Code: Select all
...
D>U: $Send|
U>D: Data, in many chunks.
D>U: $Send| <- when 40906 bytes are sent, ask for more
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
Thank You
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.
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.
Difference Between DC++ And NMDC
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