My latest thoughts on the packet-reading part of Tobruk is
to have the following objects:
REPOS - a class that is capable of the following operations:
read, seek and possibly "mark" and "relocate".
REPFILE - a bit of code that converts a FILE into a REPOS.
SLWIN - Sliding window, that is capable of "seek", "set
buffer size", "move half", "move x bytes forward", that
sort of thing. Knows absolutely nothing about packets
and the fact that they're terminated with two x'00', and
that individual messages are terminated with a x'00', etc.
MSGVW - Something that knows all about x'00' and packets,
and returns pointers to beginning and end of the message,
a flag to say whether it's all visible in memory at the
moment, can skip the header if asked to, etc. One of it's
operations will be "next message".
I would expect that if packets were stored in a database, and
you were to access them with SQL, you would simply replace
the MSGVW code with SQL.
Now all I have to do is code them all. :-( :-) BFN. Paul.
@EOT:
---
* Origin: X (3:711/934.9)
|