diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-01-21 22:27:59 +0100 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-01-21 22:27:59 +0100 |
commit | 9c2bef9f407ab1e9fcd4afff430fee5d565b7e87 (patch) | |
tree | ddaf6e4f6f1efc97ff4d242ddf690afe4e712316 /tcp.h | |
parent | ed1f63961c96db6491b607ce41ec01d53b4e64a0 (diff) |
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; |