X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=src%2Fserver%2Fio.h;h=da533903b2ac7948def228899e79401c1e9edf9c;hb=c560e7b4c403cf75b5a7ebd7cc4818ade1ae845d;hp=6f59bd0b81bd1defe878fd1a82b204a5f574d894;hpb=28b8b4234e395c3fdc4800e5cfb3dcd70a15cadf;p=plomrogue diff --git a/src/server/io.h b/src/server/io.h index 6f59bd0..da53390 100644 --- a/src/server/io.h +++ b/src/server/io.h @@ -17,15 +17,8 @@ * if queue is empty and world.do_update is set, update world state file (and * unset world.do_update) and write a single dot line to server out file, then * read server in file for the next load of bytes to put onto the input queue. - * - * Reading the server in file may put many \0-terminated strings on the queue at - * once. Successive calls of io_round() will make these available one by one. - * Each such call cuts off bytes from the beginning of world.queue, up to and - * including the last \0 byte that is followed by a non-\0 byte or ends the - * queue. If the queue starts with a \0 byte, it and its \0 followers are cut - * and a NULL pointer is returned. Reading from the input file stops only when - * one or more byte were read and the next read returns 0 bytes. If the - * re-filled queue does not end in a \0 byte, a \0 byte is appended to it. + * (Queueing ensures only complete messages are interpreted, and io_loop()'s + * server tests only happening in a multi-second interval on inactivity.) */ extern char * io_round();