diff options
| author | xHire <xhire@tuxportal.cz> | 2008-10-25 14:11:06 +0200 |
|---|---|---|
| committer | xHire <xhire@tuxportal.cz> | 2008-10-25 14:11:06 +0200 |
| commit | c8a9209d77a896bf49227e5aeccd54e91ccf29cc (patch) | |
| tree | 6b7367406ebbc6ce3ea5e0c8668c75f6fb3f6ae9 /src/base/server.h | |
| parent | cb9deba915dd7b114eeb76601eb1c8b07c1ba90f (diff) | |
Changed style of the code to the K&R standard
Diffstat (limited to 'src/base/server.h')
| -rw-r--r-- | src/base/server.h | 59 |
1 files changed, 29 insertions, 30 deletions
diff --git a/src/base/server.h b/src/base/server.h index b95b9d9..b7e9433 100644 --- a/src/base/server.h +++ b/src/base/server.h @@ -1,51 +1,50 @@ #ifndef MY_SERVER -#define MY_SERVER +# define MY_SERVER -#include <time.h> +# include <time.h> -#include "list.h" -#include "tux.h" -#include "myTimer.h" -#include "protect.h" -#include "buffer.h" +# include "list.h" +# include "tux.h" +# include "myTimer.h" +# include "protect.h" +# include "buffer.h" -#ifndef PUBLIC_SERVER -#include "interface.h" -#endif +# ifndef PUBLIC_SERVER +# include "interface.h" +# endif -#include "udp.h" +# include "udp.h" -#define SERVER_TIMEOUT 1000 -#define SERVER_TIME_SYNC 1000 -#define SERVER_TIME_PING 1000 -#define SERVER_MAX_CLIENTS 100 +# define SERVER_TIMEOUT 1000 +# define SERVER_TIME_SYNC 1000 +# define SERVER_TIME_PING 1000 +# define SERVER_MAX_CLIENTS 100 -#define SERVER_INDEX_ROOT_TUX 0 +# define SERVER_INDEX_ROOT_TUX 0 -#define CLIENT_TYPE_UDP 1 -#define CLIENT_TYPE_TCP 2 +# define CLIENT_TYPE_UDP 1 +# define CLIENT_TYPE_TCP 2 -typedef struct client_struct -{ - int type; +typedef struct client_struct { + int type; - sock_udp_t *socket_udp; + sock_udp_t *socket_udp; - buffer_t *recvBuffer; - buffer_t *sendBuffer; + buffer_t *recvBuffer; + buffer_t *sendBuffer; - int status; + int status; - tux_t *tux; + tux_t *tux; - protect_t *protect; + protect_t *protect; - list_t *listSendMsg; - list_t *listRecvMsg; + list_t *listSendMsg; + list_t *listRecvMsg; - list_t *listSeesShot; + list_t *listSeesShot; } client_t; extern int initServer(char *ip4, int port4, char *ip6, int port6); |