dcdev mailing list

Direct Connect developers, 2003 to 2005
← All threads

ADC Issues

6 messages · Opera, Jacek Sieka, Carl-Adam Brengesjö, eric
22 January 2004, 10:24Opera <[email protected]>
There are issues with ADC that I personally consider should be changed
or looked more deeply into.

First of all it's the message delimiter \r\n that should be changed to
\n. There is no reason to favor the current win32 implementation of
new-lines here, it only adds bug-sources to code. Splitting messages
with only one 'char' is better in every possible way I think. And this
isn't http anyway ;)

Numbers should be at least double? "double" is implementation-specific
so I guess you mean 64-bit? And then, why? This must be, just like
integers being 64-bit, state dependant. Not all kinds of data needs such
large numbers, I'd say that's a specification that should be removed
from the protocol.

As sandos mentioned in the hub chat; "Filenames outside the root are
treated as special". Outside what root? What _exactly_ are you talking
about here?

I think there should be support for binary data without base32 for
communication between client and hub (and also hub to hub if that is at
all supported), similar to the "DATA state". This might be very useful
and adds no complexity since hubs/clients that don't use it, won't need
to. Still it has to be in the protocol spec.

In the ERR message there are params and description. Since this protocol
says that message parts are delimited with space, and descriptions can
include space, how will I know what is a parameter to ERR and what is
the description? Maybe "ERR Code:Descr: param1 param2..." is a better
way, and force description not to include ':'.. It's ugly yes, but just
a note.

In INF I couldn't see an ip port for TCP. How will client A be able to
connect to client B without knowing the TCP port? Maybe I missed
something..
And when speaking of INF, "HI"? Can an arbitrary user send that info to
become invisible? I think it should be used only for special occasions
of some kind of bots. And then it's prolly up to the hub anyway to "make
it hidden", so, I really don't see the use of this.

I would like a "mode" where file sharing is disabled, a kind of "chat
only mode". That should be represented in the INF as well with HC or
something like that..

If I send a MSG how will end-lines be escaped? The regular \n (or if
\r\n for some very weird reason is preferred) will cause the next line
to be interpreted as another message/command, right?

Regarding the search, there is support for ==-searches ("Exact size in
bytes"). If this is to be included into the clients, and those clients
should be somewhat compatible to the "old" DC-protocol, then I'd say an
equal would be useful. I have for prolly a year been doing this in oDC
by letting the size-type be "don't care" _but_ sending a filesize > 0b,
which will (in oDC atleast) be interpreted as exact size. I'd say it
would be good if your clients out there, did the same.

That's it for now,
/Opera

22 January 2004, 10:40Jacek Sieka <[email protected]>
to "'Direct Connect developers'" <[email protected]>
First of all it's the message delimiter \r\n that should be changed to
\n. There is no reason to favor the current win32 implementation of
new-lines here, it only adds bug-sources to code. Splitting messages
with only one 'char' is better in every possible way I think. And this
isn't http anyway ;)
Yes, I changed it just now...

Numbers should be at least double? "double" is implementation-specific
so I guess you mean 64-bit? And then, why? This must be, just like
integers being 64-bit, state dependant. Not all kinds of data needs such
large numbers, I'd say that's a specification that should be removed
from the protocol.
At least 64 bit, that's what double means in my eyes...as for different
sizes in different states, why bother? There aren't very many numbers anyway
in the protocol...(actually, the general double spec can probably be removed
since there are no doubles used...), and it's not like you'll run out of
memory on your precious machine if you use an int64 instead of an int32...

As sandos mentioned in the hub chat; "Filenames outside the root are
treated as special". Outside what root? What _exactly_ are you talking
about here?
Yes, that needs further explanation.../ is the unnamed root that counts for
the share, while for instance TTH/ could be the tiger three hash root...I'm
open to suggestions here though...

I think there should be support for binary data without base32 for
communication between client and hub (and also hub to hub if that is at
all supported), similar to the "DATA state". This might be very useful
and adds no complexity since hubs/clients that don't use it, won't need
to. Still it has to be in the protocol spec.
The problem is escaping mainly, i e if we use binary data then suddenly we
have to either send lengths (which defeats the purpose of a text-based
protocol) or escape the binaries (which is ugly)...

In the ERR message there are params and description. Since this protocol
says that message parts are delimited with space, and descriptions can
include space, how will I know what is a parameter to ERR and what is
the description? Maybe "ERR Code:Descr: param1 param2..." is a better
way, and force description not to include ':'.. It's ugly yes, but just
a note.
You escape the space?

In INF I couldn't see an ip port for TCP. How will client A be able to
connect to client B without knowing the TCP port? Maybe I missed
something..
Port is in the CTM so that one client can support many protocols...

And when speaking of INF, "HI"? Can an arbitrary user send that info to
become invisible? I think it should be used only for special occasions
of some kind of bots. And then it's prolly up to the hub anyway to "make
it hidden", so, I really don't see the use of this.
Then it's up to the hub to block it / add it appropriately...

I would like a "mode" where file sharing is disabled, a kind of "chat
only mode". That should be represented in the INF as well with HC or
something like that..
Use irc?

/J

22 January 2004, 10:57Opera <[email protected]>
to "'Direct Connect developers'" <[email protected]>
> As sandos mentioned in the hub chat; "Filenames outside the root are
> treated as special". Outside what root? What _exactly_ are you
talking
> about here?
Yes, that needs further explanation.../ is the unnamed root that
counts for
the share, while for instance TTH/ could be the tiger three hash
root...I'm
open to suggestions here though...

But a share can consist of several different folders in different levels
on different drives etc, so the root part is still somewhat unclear.

> I think there should be support for binary data without base32 for
> communication between client and hub (and also hub to hub if > that is at
> all supported), similar to the "DATA state". This might be very
useful
> and adds no complexity since hubs/clients that don't use it, > won't need
> to. Still it has to be in the protocol spec.
The problem is escaping mainly, i e if we use binary data then
suddenly we
have to either send lengths (which defeats the purpose of a text-based
protocol) or escape the binaries (which is ugly)...


I never understood why the protocol had to be text-only, i mean, it Is a
_file_ (they are usually binary) sharing protocol, so a length specifyer
or similary wouldn't be difficult. I see some needs for being able to
communicate with the hub from a client with binary data to not be forced
to send it in a bandwidth eating way such as base32 or similar.

> I would like a "mode" where file sharing is disabled, a kind of
"chat
> only mode". That should be represented in the INF as well with HC or
> something like that..
Use irc?

OK so you Don't want binary hub-client transfers for some reason, even
tho it might be very useful, and adds little complexity (is it due to
your current implementations of text vs binary in your dc++
socket-class?), and now you don't think this is a good feature? Many
people I've talked to, both users and developers, see a use for this so
I really can't understand how you can tell me to go use irc. I thought I
had something to say, that I could request features without such an
attitude, without a Reason not to include it.

O

22 January 2004, 11:12Carl-Adam Brengesjö <[email protected]>
to Direct Connect developers

Opera wrote:
There are issues with ADC that I personally consider should be changed
or looked more deeply into.

First of all it's the message delimiter \r\n that should be changed to
\n. There is no reason to favor the current win32 implementation of
new-lines here, it only adds bug-sources to code. Splitting messages
with only one 'char' is better in every possible way I think. And this
isn't http anyway ;)

The question is not really about dos newlines or not, a CRLF pair is just more rare in normal messages and it's commonly used in protocols (dont ask me why).
It's easier to split messages by 1 char, but I dont think that todays machines have any problems doing it, nor the coders.
And besides (as you mentioned dos newlines) the CRLF pair will not be used as a newline, it will be used as a command delimiter (as you said).
Newlines (in chat messages) would be simplest to use a single \n as it's shorter than a CRLF pair and is more frequent in (chat) messages.
Also, as discussed in previous mails, this adds for easier debugging via a telnet session.
Besides, what's the big fuzz?

Numbers should be at least double? "double" is implementation-specific
so I guess you mean 64-bit? And then, why? This must be, just like
integers being 64-bit, state dependant. Not all kinds of data needs such
large numbers, I'd say that's a specification that should be removed
from the protocol.

As it is a not a binary protocol this does not matter. If a client has stored his/hers share size in a 64-bit double and would print it into a text command would still be something like "21335535.2355".
What I belive what has been said is that the numbers used (large ones) should be a decimal one.

In the ERR message there are params and description. Since this protocol
says that message parts are delimited with space, and descriptions can
include space, how will I know what is a parameter to ERR and what is
the description? Maybe "ERR Code:Descr: param1 param2..." is a better
way, and force description not to include ':'.. It's ugly yes, but just
a note.

Why not reply codes? Like most of the protocols used anyway?
"<code> <description> [<param1>[ <param2>]"
like in:
`301 "Erroneous Nickname" This}Nick$NameContains%Illegal#chars'

Oh, and about the error codes. Really need a a range of 100 codes per category? I think a range of 5-10 would do, really.

In INF I couldn't see an ip port for TCP. How will client A be able to
connect to client B without knowing the TCP port? Maybe I missed
something..
And when speaking of INF, "HI"? Can an arbitrary user send that info to
become invisible? I think it should be used only for special occasions
of some kind of bots. And then it's prolly up to the hub anyway to "make
it hidden", so, I really don't see the use of this.

U4,U6 ?

I would like a "mode" where file sharing is disabled, a kind of "chat
only mode". That should be represented in the INF as well with HC or
something like that..

Should be set serverside, otherwise there would be ppl/clients choosing not to share - only download. Mean, either everyone shares, or noone at all.

If I send a MSG how will end-lines be escaped? The regular \n (or if
\r\n for some very weird reason is preferred) will cause the next line
to be interpreted as another message/command, right?

Like I said in the discussion before with the CRLF delimiter. Use CRLF for ending commands. LF for chat message newlines. Simple.

/Carl-Adam

23 January 2004, 05:21eric <[email protected]>
to Direct Connect developers <[email protected]>, "Opera" <[email protected]>

But a share can consist of several different folders in different levels
on different drives etc, so the root part is still somewhat unclear.

not really. Conceptually, the root is defined on all systems as a node behind its own parent. Even if a share list looks like a directory, it is nothing less than a tree and the share list is just a node having all the directories you share mounted on it.

I never understood why the protocol had to be text-only, i mean, it Is a
_file_ (they are usually binary) sharing protocol, so a length specifyer
or similary wouldn't be difficult. I see some needs for being able to
communicate with the hub from a client with binary data to not be forced
to send it in a bandwidth eating way such as base32 or similar.

Yes, the binary vs text protocol troll is back :)

Eric

23 January 2004, 05:25eric <[email protected]>
to Direct Connect developers <[email protected]>, "Jacek Sieka" <[email protected]>

> I would like a "mode" where file sharing is disabled, a kind of "chat
> only mode". That should be represented in the INF as well with HC or
> something like that..

Use irc?

speaking of chat only and hub bandwidth. Why does private chat messages have to go thru the hub ? But maybe it is a false problem. Does someone has an estimation on the amount of private chat messages on a hub (compared to public chat) [yes, I know, it depends on the hub].

Eric