a3aa574b8114f539cd0b2424ebbbfe4f19d8ab2b
[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 "network_common.h"
12 #include "highscores.h"
13 #include <sys/socket.h>
14
15 struct {
16 HSteamNetPollGroup client_group;
17 EServerMode auth_mode;
18
19 struct gameserver_client {
20 int active;
21 int authenticated;
22 HSteamNetConnection connection;
23 char username[ NETWORK_USERNAME_MAX ];
24 }
25 clients[ 32 ];
26
27 u8 app_symmetric_key[ k_nSteamEncryptedAppTicketSymmetricKeyLen ];
28
29 int monitor_fd;
30 int monitor_clients[ 4 ];
31 }
32 static gameserver = {
33 .auth_mode = eServerModeAuthentication
34 };
35
36 static ISteamNetworkingSockets *hSteamNetworkingSockets = NULL;
37
38 #endif /* GAMESERVER_H */