Ämne:
Re: [dcdev] Searching
Från:
Fredrik Tolf
Datum:
2004-01-16 7:35
Till:
eric
Kopia:
Direct Connect developers <[email protected]>

eric writes:
> Can you give an example (or 2) of your way a connection is
> established between a client and a hub. I think state machines are
> good but it must be a one with no dead end.

I, too, think state machines are good, but not here.

The point of it is so that the identification conversation can look in
all these ways and more:

1:
C->H: GUID xxx
H->C: ACCP
C->H: DESC xxx
H->C: WELC

2:
C->H: DESC xxx
H->C: ACCP
C->H: GUID xxx
H->C: WELC

3:
C->H: GUID xxx1
H->C: ACCP
C->H: GUID xxx2
H->C: ACCP
C->H: GUID xxx3 (note that this will be the authoritative one)
H->C: ACCP
C->H: DESC xxx
H->C: WELC

Essentially, a state machine where you must send GUID first and then
DESC is like this context engine, only that it has even more contexts
and even more implicit changes. Therefore, I think this is clearer,
more flexible, and also allows for human input error when eg. typing
in a Telnet session. Also, since all contexts are named, that gives a
very strict definition of the protocol - there can be no doubts
anywhere about when you should/could send what.

At least that is the idea I had behind it.

Fredrik Tolf

-- 
DC Developers mailinglist
http://3jane.ashpool.org/cgi-bin/mailman/listinfo/dcdev