network items, interp boundaries
[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 char items[k_netmsg_playeritem_max][ADDON_UID_MAX];
25 }
26 clients[ NETWORK_MAX_PLAYERS ];
27
28 u8 app_symmetric_key[ k_nSteamEncryptedAppTicketSymmetricKeyLen ];
29
30 int monitor_fd;
31 int monitor_clients[ 4 ];
32 }
33 static gameserver = {
34 .auth_mode = eServerModeAuthentication
35 };
36
37 static ISteamNetworkingSockets *hSteamNetworkingSockets = NULL;
38
39 #endif /* GAMESERVER_H */