[DGD] Writing an external network daemon
Blake Arnold
BArnold at cartonservice.com
Mon Jul 27 15:28:26 CEST 2009
What data from the UDP connection object is passed on to the Klib? I know that the 'ip:port' pair makes up the connection object. Is this the only information that is available?
Blake Arnold
IT Tech Suport
E:barnold at cartonservice.com
P:419-342-9524
-----Original Message-----
From: dgd-bounces at dworkin.nl [mailto:dgd-bounces at dworkin.nl] On Behalf Of Petter Nyström
Sent: Sunday, July 26, 2009 9:32 AM
To: All about Dworkin's Game Driver
Subject: [DGD] Writing an external network daemon
The recent thread "networking/beginner comments" re-sparked my wish to
write an external network daemon for my MUD. The concept of an
external network daemon has been discussed earlier on this list as an
alternative solution to the network package. I do not have a real need
for outgoing network connections in my MUD at this point, and if I did
I'd probably be using the network package anyway. So this is just an
exercise for myself.
Anyway, to get to my question. I have most of the stuff operational
now: objects can inherit an API that allows them to request an
outgoing connection and is hooked up by the external daemon that let
them send data back and forth. But my problem is this: how should I
best control the flow of data that it passed to receive_message()? My
alternatives have been:
* Let the external daemon pass on character by character to
receive_message() and let the LPC layer deal with buffering and so
forth.
* Let the external daemon know something about the protocol that is
to be used, so that i can do buffering by newline, EOF-mark, whatever;
and then send appropriate chunks of data to receive_message().
* Let the external daemon buffer for as long as there is data to be
read from the socket, and send the buffer to receive_message() when
there is no more data to read. But this seems like it could get into
an undefined behaviour pretty easily if there is a busy connection?
I feel that I'm lacking some knowledge in the networking field here.
Please advice! =)
For example, how does the networking package work?
Thanks,
Jimorie
___________________________________________
https://mail.dworkin.nl/mailman/listinfo/dgd
More information about the DGD
mailing list