* src/ttt-server.c (ttt_server_unregister_client): Move client has
left message to stderr so it makes it to the log file too.
+2005-12-09 Carl Worth <cworth@cworth.org>
+
+ * src/ttt-server.c (ttt_server_unregister_client): Move client has
+ left message to stderr so it makes it to the log file too.
+
2005-12-09 Carl Worth <cworth@cworth.org>
* src/ttt-server.c (main): Put the initial server started message
2005-12-09 Carl Worth <cworth@cworth.org>
* src/ttt-server.c (main): Put the initial server started message
Use the first letter of your name to indicate you are in the middle of
working on something.
Use the first letter of your name to indicate you are in the middle of
working on something.
+Protocol pieces
+---------------
+
/----- Server, implemented in ttt-server
/ /---- Client, implemented in ttt
S C
/----- Server, implemented in ttt-server
/ /---- Client, implemented in ttt
S C
3.6.2.1. ERROR NOT_YOUR_TURN
3.6.2.2. ERROR NOT_VALID_MOVE
3.6.2.1. ERROR NOT_YOUR_TURN
3.6.2.2. ERROR NOT_VALID_MOVE
+Other bits
+----------
+Server log messages should include pid date and time. And server
+should log the fact when it gets terminated by a signal.
assert (i < server->num_clients);
assert (i < server->num_clients);
- printf ("Client %s has left.\r\n", ttt_client_get_username (client));
+ fprintf (stderr, "Client %s has left.\r\n", ttt_client_get_username (client));
memmove (&server->clients[i], &server->clients[i+1],
(server->num_clients - i - 1) * sizeof (ttt_client_t *));
memmove (&server->clients[i], &server->clients[i+1],
(server->num_clients - i - 1) * sizeof (ttt_client_t *));