Ämne: Re: [dcdev] Re: New Encoding Scheme First |
Från: eric |
Datum: 2003-12-02 5:41 |
Till: Direct Connect developers <[email protected]>, "Zdenek Stangl" <[email protected]> |
> Might I ask what you want the FF FF start word for?
for the case of total data distortion. I think it's always better to have
some 'anchor' for cases, when data goes inconsistent or mangled, than none.
Doing word-splitting for every incomming data on the hub-side isn't really
good idea. For current DC protocol, Im having custom parsing routine for
every single command, looking only for tokens or specific parts that I
really need for the processing. Im also avoiding data copying/moving as
much as possible and believe me, all this has helped to gain performance of
ptokax by approximately 15% in 0.330 version in comparsion with currenlty
available 0.326, which uses string classes and copies data a lot. And
that's just the parsing mechanism. All sockets are in non-blocking mode -
when underlaying tcp kernel wouldblock, im buffering data by myself - no
blocking, no threads.
There is still something missing in our discussion, to have it
constructive. Try to come out with alternatives, if you can't agree with my
draft, please.