File: server.h

package info (click to toggle)
gbatnav 1.0.4cvs20051004-8
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 4,780 kB
  • sloc: ansic: 14,122; sh: 11,667; makefile: 643; yacc: 288; xml: 42; sed: 16
file content (41 lines) | stat: -rw-r--r-- 886 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*	$Id: server.h,v 1.2 2001/04/04 21:31:01 riq Exp $	*/
#ifndef __BN_SERVER_H__
#define __BN_SERVER_H__

#include "protocol.h"


typedef struct tabla_typ {
	int  x,y;
	char p[10][10];
} tabla;



struct st_datos {
	char	server_name[50];		/* server name */
	int	port;				/* donde va el port */
	int	sock;				/* socket ppal del server */
	int	nro_tot[MAXPLAYER];		/* estado del jugador */
	int	nro_fd[MAXPLAYER];		/* fd o socket */
	int	hits[MAXPLAYER];		/* how many hits has a player received */
	tabla	table[MAXPLAYER];		/* tablas de los jugadores */
	char	names[MAXPLAYER][MAXNAMELEN];	/* other players's name */
	int	tag[MAXPLAYER];			/* gdk que lee */
	int	with_ggz;			/* enables ggz mode */
};

enum {
	C_NUMBER,
	C_NAME,
	C_HOSTNAME,
	C_CLIVER,
	C_STATUS,
	C_LASTTOKEN
};

extern struct st_datos usuario;

#define BATNAV_UDSOCKET "/tmp/batnav-socket"

#endif /* __BN_SERVER_H__ */