diff options
Diffstat (limited to 'tcp.h')
-rw-r--r-- | tcp.h | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -31,10 +31,13 @@ TcpList* tcp_read_list(int sock,const char *tag); void tcp_list_destroy(TcpList *list); typedef enum TcpResponseType{ - TCP_OK, - TCP_LIST, - TCP_INT, - TCP_ERROR, + TCP_OK, //- + TCP_LIST, //lval + TCP_INT, //ival + TCP_ERROR, //eval + TCP_PUSH_JOIN, //jval + TCP_PUSH_LEAVE, //jval + TCP_PUSH_MESSAGE, //mval } TcpResponseType; typedef struct TcpResponse{ @@ -42,7 +45,16 @@ typedef struct TcpResponse{ union { TcpList *lval; i64 ival; - char *eval; //Newly allocated string + char *eval; + struct { + char *gameid,*roomid; + i64 id; + } jval; + struct { + char *gameid,*roomid; + i64 id; + char *message; + } mval; }; } TcpResponse; |