src/game.h

changeset 94
864f59271974
parent 92
84e0dec5db16
--- a/src/game.h	Sun Mar 29 13:26:00 2026 +0200
+++ b/src/game.h	Sun Mar 29 15:17:28 2026 +0200
@@ -39,18 +39,30 @@
 
 typedef struct {
     GameInfo gameinfo;
-    char* serverhost; /* NULL, if we are about to start a server */
+    /**
+     * Server host address.
+     * TCP: server address or \c NULL when we are the server
+     * Domain Socket: the path to the domain socket
+     */
+    char* serverhost;
     char* continuepgn;
     short port;
+    bool ishost;
+    bool usedomainsocket;
     bool singlemachine;
     bool disableflip;
     bool unicode;
 } Settings;
 
-#define is_server(settings) !((settings)->serverhost)
-
 void game_play_singlemachine(Settings *settings);
 
+/**
+ * Plays a network game of chess.
+ *
+ * @param settings the game settings
+ * @param gamestate the current game state
+ * @param opponent file descriptor for the opponent
+ */
 void game_play(Settings *settings, GameState *gamestate, int opponent);
 void game_review(Settings* settings, GameState *gamestate);
 

mercurial