Hi all,
I have one question...
Can someone put me the communication between clients (a Downloader and an Uploader) ??
I would have the communication for an active D and for a passive one.
Because i'm starting in making a passive one and i can't make it working.
I have this help for an active one :
Client <-> Client Communication in DC. 11-05-2002. 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 Upload <anumber>|$Key <key for U's lock>|
U>D: $Direction Download <anumber>|$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
But I need the passive communication too (mean D connects to U after sending him a $RevConnectToMe and after U send D back a $ConnectToMe)
I think this should be like this, but it don't work :
PASSIVE FILE DOWNLOAD
----------------------
D = downloader
U = uploader
H = hub
D>H: $RevConnectToMe <D's username> <U's username>|
H>U: $RevConnectToMe <D's username> <U's username>|
U>H: $ConnectToMe <D's username> <U's IP and port>|
H>D: $ConnectToMe <D's username> <U's IP and port>|
D>U: Connection
D>U: $MyNick <D's nick>|$Lock <new lock with pk>|
U>D: $MyNick <U's nick>|$Lock <new lock with pk>|$Direction Upload <anumber>|$Key <key for D's lock>|
D>U: $Direction Download <anumber>|$Key <key for U'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
Problem is I can't get nothing after D send $Key... U won't reply me to a $Get or $GetListLen... !!! HHHHEEELLLPPPP !
Thanks by advance,
Chaz
Passive D client <> Active U client communication
Moderator: Moderators
more precisions
Hi again,
more precisions for my problem... :
I don't know if it's a socket problem (a coding error) or if i have made a bad implementation of the protocol ?
I think it's a bad implementation problem because in my client to client communication in can go to :
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 Upload <anumber>|$Key <key for U's lock>|
U>D: $Direction Download <anumber>|$Key <key for D's lock>|
And nothing ... D (in my tests is a dc++ client that will get the U's filelist, and U is my developping client) don't send any more commands ... whyyyyyy ???
It's the same thing in an active communication (D passive, my client and U active, my dc++ client).
Hope this will help you and me to find THE solution to my problem,
Chaz
more precisions for my problem... :
I don't know if it's a socket problem (a coding error) or if i have made a bad implementation of the protocol ?
I think it's a bad implementation problem because in my client to client communication in can go to :
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 Upload <anumber>|$Key <key for U's lock>|
U>D: $Direction Download <anumber>|$Key <key for D's lock>|
And nothing ... D (in my tests is a dc++ client that will get the U's filelist, and U is my developping client) don't send any more commands ... whyyyyyy ???
It's the same thing in an active communication (D passive, my client and U active, my dc++ client).
Hope this will help you and me to find THE solution to my problem,
Chaz
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
For starters... are you sniffing the communications? Ethereal is free and nice.
On the road again... again
Yeah sniffing you're right ! i'll try it now. Thanks
Chaz
Chaz
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
Re: On the road again... again
=) It's not really an answer to your question, but by using DC++ in passive mode in place of your client, you should be able to see what it does differently. You can test out NMDC as well - I hear Jon has a new weekly build on his news page.chaz wrote:Yeah sniffing you're right ! i'll try it now.
Hi
Thanks for your idea of ethereal I solve my problem with it !
It was and wasn't a bad implementation of the protocol by myself in my client, something very silly : \015\012 chars at the end of each raw line sent to the socket (shame on me .
But it's strange that when the client to client connection is made, I can go through (being U) the $Key process... so $MyNick and $Lock are well interpreted by dc++ with \015\012 but not the $Key !
I realize I don't speak about my developping client... it's not a frontend to user interface, it's a front end to software interface between protocol and a GUI for example. To be more precise it is a perl library Net::DC !
Thanks again, I can now go to bed, freed
Chaz
Thanks for your idea of ethereal I solve my problem with it !
It was and wasn't a bad implementation of the protocol by myself in my client, something very silly : \015\012 chars at the end of each raw line sent to the socket (shame on me .
But it's strange that when the client to client connection is made, I can go through (being U) the $Key process... so $MyNick and $Lock are well interpreted by dc++ with \015\012 but not the $Key !
I realize I don't speak about my developping client... it's not a frontend to user interface, it's a front end to software interface between protocol and a GUI for example. To be more precise it is a perl library Net::DC !
Thanks again, I can now go to bed, freed
Chaz
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us