show playernames in debug view
[carveJwlIkooP6JGAAIwe30JlM.git] / gameserver.h
1 #ifndef GAMESERVER_H
2 #define GAMESERVER_H
3
4 #define VG_SERVER
5 #include "vg/vg.h"
6 #include "vg/vg_steam.h"
7 #include "vg/vg_steam_networking.h"
8 #include "vg/vg_steam_http.h"
9 #include "vg/vg_steam_auth.h"
10 #include "network_msg.h"
11 #include "highscores.h"
12 #include <sys/socket.h>
13
14 struct {
15 HSteamNetPollGroup client_group;
16 EServerMode auth_mode;
17
18 struct gameserver_client {
19 int active;
20 int authenticated;
21 HSteamNetConnection connection;
22 char username[32];
23 }
24 clients[ 32 ];
25
26 u8 app_symmetric_key[ k_nSteamEncryptedAppTicketSymmetricKeyLen ];
27
28 int monitor_fd;
29 int monitor_clients[ 4 ];
30 }
31 static gameserver = {
32 .auth_mode = eServerModeAuthentication
33 };
34
35 static ISteamNetworkingSockets *hSteamNetworkingSockets = NULL;
36
37 #endif /* GAMESERVER_H */