X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;ds=sidebyside;f=src%2Fclient%2Fio.h;h=1e47404bab8a323f8c90f0d8951ee94c6b626569;hb=4438d108ea0242ed0a17207ae4cb1f4b30ce2f5b;hp=344a8eebb793950688f367d6f9b9d38f6d6a4412;hpb=28b8b4234e395c3fdc4800e5cfb3dcd70a15cadf;p=plomrogue diff --git a/src/client/io.h b/src/client/io.h index 344a8ee..1e47404 100644 --- a/src/client/io.h +++ b/src/client/io.h @@ -20,17 +20,20 @@ */ extern void send(char * msg); -/* Keep checking for user input, a changed worldstate file and the server's - * wakefulness. Update client's world representation on worldstate file changes. - * Manipulate the client and send commands to server based on the user input as - * interpreted by the control.h library. +/* Keep checking for user input, a changed worldstate file, and queue input from + * the server's out file. Update client's world representation on worldstate + * file changes. Manipulate the client and send commands to server based on the + * user input as interpreted by the control.h library. * * On each change / activity, re-draw the windows with draw_all_wins(). When the * loop ends regularly (due to the user sending a quit command), return an * appropriate quit message to write to stdout when the client winds down. Call * reset_windows() on receiving a SIGWINCH. Abort on assumed server death if the * server's out file does not get updated, even on PING requests. Re-focus map - * view on player if world.focus_each_turn is set. + * view on player if world.focus_each_turn is set. Messages from the out file + * are put together on the queue first, from which only complete (\n-delimited) + * messages are read. Queues of messages are worked through completely / emptied + * before any re-drawing happens. */ extern char * io_loop();