diff options
Diffstat (limited to 'src/client.c')
| -rw-r--r-- | src/client.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/client.c b/src/client.c index c770f3c..2d98790 100644 --- a/src/client.c +++ b/src/client.c @@ -88,6 +88,13 @@ void sendServer(char *msg) assert( msg != NULL ); +#ifndef PUBLIC_SERVER + if( isParamFlag("--send") ) + { + printf("send -> %s", msg); + } +#endif + #ifdef SUPPORT_NET_UNIX_UDP ret = writeUdpSocket(sock_server_udp, sock_server_udp, msg, strlen(msg)); #endif @@ -95,10 +102,6 @@ void sendServer(char *msg) #ifdef SUPPORT_NET_SDL_UDP ret = writeSdlUdpSocket(sock_server_sdl_udp, sock_server_sdl_udp, msg, strlen(msg)); #endif - -#ifdef DEBUG_CLIENT_SEND - printf("send server msg->%s", msg); -#endif } static int eventServerSelect() @@ -141,10 +144,12 @@ void eventServerBuffer() while ( getBufferLine(clientBuffer, line, STR_PROTO_SIZE) >= 0 ) { -#ifdef DEBUG_CLIENT_RECV +#ifndef PUBLIC_SERVER + if( isParamFlag("--recv") ) + { + printf("recv -> %s", line); + } #endif - printf("recv server msg->%s", line); - if( strncmp(line, "error", 5) == 0 )proto_recv_error_client(line); if( strncmp(line, "init", 4) == 0 )proto_recv_init_client(line); if( strncmp(line, "event", 5) == 0 )proto_recv_event_client(line); @@ -163,7 +168,6 @@ void eventServerBuffer() } } - void eventPingServer() { my_time_t currentTime; |