summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/data_network.h4
-rw-r--r--src/include/utils.h5
2 files changed, 7 insertions, 2 deletions
diff --git a/src/include/data_network.h b/src/include/data_network.h
index 9725cd5..5dc10fe 100644
--- a/src/include/data_network.h
+++ b/src/include/data_network.h
@@ -7,7 +7,7 @@
#include "data_lemming.h"
#include "events.h"
-// All necessary stuff to ensure that client node on the network can synchronize each other
+// All necessary stuff to ensure that clients nodes on the network can synchronize each other
#define DEFAULT_LISTEN_PORT 9999
@@ -18,7 +18,7 @@ typedef struct {
enum gameState state;
int startTime_ms;
int clientCount;
- struct _client_t **clients; // FIXME: il y a toujours la boucle ?
+ struct _client_t **clients; // typedef client_t defined below (ref loop)
} game_t;
enum clientState { clientNew, clientReady };
diff --git a/src/include/utils.h b/src/include/utils.h
index 085884d..856a56e 100644
--- a/src/include/utils.h
+++ b/src/include/utils.h
@@ -6,12 +6,17 @@
#define LOG_WARN 2
#define LOG_ERROR 3
+// open a log file. If path==NULL, then use stderr
void openLog(char path[]);
void closeLog();
+// Log a string
void logs(int level, char msg[]);
+// Log 2 strings
void logs2(int level, char context[], char msg[]);
+// Log a system call failure (after msg, perror the last ERRNO error)
void logp(int level, char msg[]);
+// Math small stuff
int min(int a, int b);
int max(int a, int b);