[DGD]Re: send_message() and message_done()

Thomas Annandale thomas at boredatheist.com
Thu Oct 19 04:02:13 CEST 2000


I am having some trouble figuring out exactly how send_message() and
message_done() work in DGD1.1.100.  I am attempting to write an httpd
using dgd, and my code occasionally fails when sending large
files.  Please tell me if the below assumptions are correct.

When send_message(msg) == strlen(msg), then you can assume the message was
sent, and it is safe to call send_message() again.  message_done() will
not be called.

When send_message(msg) != strlen(msg), then there is some delay in sending
msg.  It is not safe to use send_message() again until message_done() is
called.  when message_done() is called, you can assume that the entire
message was sent (ie, you don't have to call
send_message(msg[bytes_sent..]), where bytes_sent is the return value of
the previous call to send_message), and can go on calling
send_message() as normal.

If all of the above is correct, then there must be something wrong with my
code in the user object to store messages and send_message them one at a
time.  I'll probably post it here for some tips. 

Also, how do I increase the maximum string length?

-- 
Thomas
www.boredatheist.com


List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list