Distributed engine: the slave now receives stats in binary form.
[pachi.git] / distributed / protocol.h
blob8e16a0a87757ad9e3e106e0196ba0eef179ff6cf
1 #ifndef ZZGO_DISTRIBUTED_PROTOCOL_H
2 #define ZZGO_DISTRIBUTED_PROTOCOL_H
4 #include <sys/socket.h>
5 #include <arpa/inet.h>
7 #include "board.h"
9 void protocol_lock(void);
10 void protocol_unlock(void);
12 void logline(struct in_addr *client, char *prefix, char *s);
14 void update_cmd(struct board *b, char *cmd, char *args, bool new_id);
15 void new_cmd(struct board *b, char *cmd, char *args);
16 void get_replies(double time_limit, int min_replies);
17 void protocol_init(char *slave_port, char *proxy_port, int max_slaves);
19 extern int reply_count;
20 extern char **gtp_replies;
21 extern int active_slaves;
23 /* Max size of all gtp commands for one game.
24 * 60 chars for the first line of genmoves plus 100 lines
25 * of 30 chars each for the stats at last move. */
26 #define CMDS_SIZE (60*MAX_GAMELEN + 30*100)
28 /* Max size for one line of reply or slave log. */
29 #define BSIZE 4096
31 #endif