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