summaryrefslogtreecommitdiff
path: root/include/proto.h
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-03-23 21:38:56 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-03-23 21:38:56 +0000
commitaec5ba5ca31f3d7c895beb658a93c353b2b8d5c1 (patch)
tree068d2a3ad5e5bf290acf2d73b87e170bc9962069 /include/proto.h
parent20ecf36f401adad01cc5ff67e411c596a8b523d5 (diff)
- zobratie zbrani/bonusov prebieha na server, a server tuto informaciu posiela clientom
- server checkuje, ci ma client spravnu verziu - clientovy, ktory sa neprihlasil do hry prikazom hello, neposiela stavy aku su end, alebo deltux - oprava malej chyby v textfiled - posladna aktivita serveru/clienta zistuje druha strana na zaklade kazdeho prijateho packetu, nie iba podla packetu ping - server posile clientovy pakcety "error <code>" ) nespravny pikaz, veriza, timeout git-svn-id: http://opensvn.csie.org/tuxanci_ng@33 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'include/proto.h')
-rw-r--r--include/proto.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/include/proto.h b/include/proto.h
index f7422ec..aba3fda 100644
--- a/include/proto.h
+++ b/include/proto.h
@@ -9,10 +9,6 @@
#include "item.h"
#include "shot.h"
-#define PROTO_SEND_ONE 0
-#define PROTO_SEND_ALL 1
-#define PROTO_SEND_BUT 2
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -41,6 +37,18 @@
#include "publicServer.h"
#endif
+#define PROTO_SEND_ONE 0
+#define PROTO_SEND_ALL 1
+#define PROTO_SEND_BUT 2
+
+#define PROTO_ERROR_CODE_UNKNOWN 0
+#define PROTO_ERROR_CODE_BAD_VERSION 1
+#define PROTO_ERROR_CODE_BAD_NAME 2
+#define PROTO_ERROR_CODE_BAD_COMMAND 3
+#define PROTO_ERROR_CODE_TIMEOUT 4
+
+extern void proto_send_error_server(int type, client_t *client, int errorcode);
+extern void proto_recv_error_client(char *msg);
extern void proto_send_hello_client(char *name);
extern void proto_recv_hello_server(client_t *client, char *msg);
extern void proto_send_status_server(int type, client_t *client);
@@ -61,6 +69,8 @@ extern void proto_send_deltux_server(int type, client_t *client, client_t *clien
extern void proto_recv_deltux_client(char *msg);
extern void proto_send_additem_server(int type, client_t *client, item_t *p);
extern void proto_recv_additem_client(char *msg);
+extern void proto_send_item_server(int type, client_t *client, tux_t *tux, item_t *item);
+extern void proto_recv_item_client(char *msg);
extern void proto_send_shot_server(int type, client_t *client, shot_t *p);
extern void proto_recv_shot_client(char *msg);
extern void proto_send_ping_client();