3 * This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3
4 * or any later version. For details on its copyright, license, and warranties,
5 * see the file NOTICE in the root directory of the PlomRogue source package.
7 * Communication of the client with the server (by reading and writing files)
8 * and the user (by writing to the screen and reading keypresses).
16 /* Write "msg" plus newline to server input file at world.path_server_in.
18 * "msg" must fit into size defined by PIPE_BUF so that no race conditiosn
19 * arise by many clients writing to the file in parallel.
21 extern void send(char * msg);
23 /* Keep checking for user input, a changed worldstate file, and queue input from
24 * the server's out file. Update client's world representation on worldstate
25 * file changes. Manipulate the client and send commands to server based on the
26 * user input as interpreted by the control.h library.
28 * On each change / activity, re-draw the windows with draw_all_wins(). When the
29 * loop ends regularly (due to the user sending a quit command), return an
30 * appropriate quit message to write to stdout when the client winds down. Call
31 * reset_windows() on receiving a SIGWINCH. Abort on assumed server death if the
32 * server's out file does not get updated, even on PING requests. Re-focus map
33 * view on player if world.focus_each_turn is set.
35 extern char * io_loop();