7 #include "vg/vg_steam.h"
8 #include "vg/vg_steam_networking.h"
9 #include "vg/vg_steam_http.h"
10 #include "vg/vg_steam_auth.h"
11 #include "network_msg.h"
12 #include "network_common.h"
13 #include <sys/socket.h>
15 #define CLIENT_KNOWLEDGE_SAME_WORLD0 0x1
16 #define CLIENT_KNOWLEDGE_SAME_WORLD1 0x2
17 #define CLIENT_KNOWLEDGE_FRIENDS 0x4 /* TODO? */
20 HSteamNetPollGroup client_group
;
21 EServerMode auth_mode
;
23 struct gameserver_client
{
27 HSteamNetConnection connection
;
28 char username
[ NETWORK_USERNAME_MAX
];
32 struct gameserver_item
{
33 char uid
[ADDON_UID_MAX
];
36 items
[k_netmsg_playeritem_max
];
38 char region
[ NETWORK_REGION_MAX
];
43 clients
[ NETWORK_MAX_PLAYERS
];
45 u8 client_knowledge_mask
[ (NETWORK_MAX_PLAYERS
*(NETWORK_MAX_PLAYERS
-1))/2 ];
46 u8 app_symmetric_key
[ k_nSteamEncryptedAppTicketSymmetricKeyLen
];
48 /* TODO: Consider removing this */
50 int monitor_clients
[ 4 ];
53 .auth_mode
= eServerModeAuthentication
56 static ISteamNetworkingSockets
*hSteamNetworkingSockets
= NULL
;
58 #endif /* GAMESERVER_H */