ref: 02dabfd303e35c1508959b17b46d07bcd3d3adbc
parent: 38cb6954edfac11880bf40c2b87d3e05f649b082
author: mkf <mkf@cloud9p.org>
date: Tue Jun 4 14:57:40 EDT 2024
srv.h: add client struct, used in srv5
--- a/srv.h
+++ b/srv.h
@@ -1,3 +1,5 @@
+#define playersock sockfd[turn % 2]
+
extern int id;
extern int sockfd[2];
@@ -11,3 +13,13 @@
int grid[SzX][SzY];
char syncmsg[8];
}Game;
+
+typedef struct
+{
+ int fd;
+ char *nick;
+ int game;
+ int side;
+ int opts;
+ void *thread;
+}Client;