summaryrefslogtreecommitdiff
path: root/include/server.h
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-03-14 15:25:01 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-03-14 15:25:01 +0000
commita4e34c257a4f5966ce699f48d30b3528bdaa45e4 (patch)
tree90835e3ad5263748ee099fc23db99b3cd12d9370 /include/server.h
parent1438b79069821cba744a4ea4739324560be64fb6 (diff)
- program bol prepisany tak, aby sa dal v buducnosti sietovy multiplayer prepisat pre protokol UDP
( BTW network.[ch] je uz zombia ) git-svn-id: http://opensvn.csie.org/tuxanci_ng@14 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'include/server.h')
-rw-r--r--include/server.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/server.h b/include/server.h
new file mode 100644
index 0000000..d7e1313
--- /dev/null
+++ b/include/server.h
@@ -0,0 +1,34 @@
+
+#ifndef MY_SERVER
+
+#define MY_SERVER
+
+#include "list.h"
+#include "tux.h"
+#include "buffer.h"
+#include "tcp.h"
+#include "udp.h"
+
+typedef struct client_struct
+{
+ sock_tcp_t *socket_tcp;
+ sock_udp_t *socket_udp;
+ int status;
+
+ tux_t *tux;
+ buffer_t *buffer;
+} client_t;
+
+extern int initTcpServer(int port);
+extern client_t* newTcpClient(sock_tcp_t *sock_tcp);
+extern client_t* newUdpClient(sock_udp_t *sock_udp);
+extern void destroyClient(client_t *p);
+extern void sendClient(client_t *p, char *msg);
+extern void sendAllClientBut(char *msg, client_t *p);
+extern void sendAllClient(char *msg);
+extern void eventClientListBuffer();
+extern void selectServerTcpSocket();
+extern void quitTcpServer();
+
+#endif
+