26 lines
518 B
C
26 lines
518 B
C
#ifndef ANNOUNCE_H
|
|
#define ANNOUNCE_H
|
|
|
|
#include <netinet/in.h>
|
|
|
|
typedef struct gamelistentry gamelistentry;
|
|
struct gamelistentry {
|
|
struct sockaddr_in netname;
|
|
char *name;
|
|
uint32_t unique;
|
|
};
|
|
|
|
int registergame(char *playername, uint16_t port, uint32_t unique, unsigned char version[4]);
|
|
void unregistergame();
|
|
int searchgames(unsigned char version[4]);
|
|
|
|
int initannouncer();
|
|
void freeannouncer();
|
|
|
|
#define GAMELIST_MAXSIZE 10
|
|
|
|
extern gamelistentry gamelistentries[GAMELIST_MAXSIZE];
|
|
extern int gamelistsize;
|
|
|
|
#endif
|