In article <Bzq7LL.JA5@cs.bham.ac.uk> jwh@cs.bham.ac.uk (James Hawtin) writes:
>
> take most of the time is ntserv or rather the swopping/contex switch of 16 of them. Why is this forked perhaps it could be written as a single process? I know this is
>
Ok, not to beat a dead dog, but I've been working on this for a while now.
It was pretty easy to come up with multiplexed I/O for logging in. HOWEVER,
the big problems are:
o scheduling becomes a disaster! However, I'm trying reading
one packet from whoever's ready and going on to the next slot.
Updates taken care of by the daemon now get taken care of by
a signal handler.
o reading and writing becomes a disaster! If you use TCP you have
to deal with partial reads and writes of packets because you have
to use nonblocking I/O. If you want to write code, you have to
have states for everything in the universe (so to speak). The
solution? Use UDP only. But that requires a TCP like protocol
to get those packets that absolutely have to get there (like a
login name). Feel like re-inventing the wheel? I sure feel
like I am now. :)
Despite the above, it's kinda fun, so I'm keeping at it. I had a shot with
writing the server in C++, but virtual functions and shared memory ogged me
(so to speak again) as they don't work well together. Ah... too bad. :(
It would be cool to do.
(Also, I'm probably be the only person still left working on this) If anyone
has any ideas about the protocol problem (I've got some stuff from rjones (any-
one have any more?)) Feel free to send me mail!
BTW: what happened the the netrek hackers mailing list? If it's