4 #include "vg/vg_platform.h"
5 #include "vg/vg_steam.h"
6 #include "vg/vg_steam_networking.h"
7 #include "vg/vg_steam_http.h"
8 #include "vg/vg_steam_auth.h"
9 #include "network_msg.h"
10 #include "network_common.h"
11 #include <sys/socket.h>
13 #define CLIENT_KNOWLEDGE_SAME_WORLD0 0x1
14 #define CLIENT_KNOWLEDGE_SAME_WORLD1 0x2
15 #define CLIENT_KNOWLEDGE_FRIENDS 0x4 /* TODO? */
18 HSteamNetPollGroup client_group
;
19 EServerMode auth_mode
;
21 struct gameserver_client
{
25 HSteamNetConnection connection
;
26 char username
[ NETWORK_USERNAME_MAX
];
30 struct gameserver_item
{
31 char uid
[ADDON_UID_MAX
];
34 items
[k_netmsg_playeritem_max
];
36 char region
[ NETWORK_REGION_MAX
];
41 clients
[ NETWORK_MAX_PLAYERS
];
43 u8 client_knowledge_mask
[ (NETWORK_MAX_PLAYERS
*(NETWORK_MAX_PLAYERS
-1))/2 ];
44 u8 app_symmetric_key
[ k_nSteamEncryptedAppTicketSymmetricKeyLen
];
46 /* TODO: Consider removing this */
48 int monitor_clients
[ 4 ];
51 .auth_mode
= eServerModeAuthentication
54 static ISteamNetworkingSockets
*hSteamNetworkingSockets
= NULL
;