*/
static void network_submit_highscore( u32 trackid, u16 points, u16 time );
-
/*
* Game endpoints are provided with the same names to allow running without a
* network connection.
hSteamNetworkingSockets, &remoteAddr, 0, NULL );
}
+static void send_auth_ticket(void)
+{
+ u32 size = sizeof(netmsg_auth) + steam_app_ticket_length;
+ netmsg_auth *auth = malloc(size);
+
+ auth.inetmsg_id = k_inetmsg_auth;
+ auth.ticket_length = steam_app_ticket_length;
+ for( int i=0; i<steam_app_ticket_length; i++ )
+ auth.ticket[i] = steam_app_ticket[i];
+
+ SteamAPI_ISteamNetworkingSockets_SendMessageToConnection(
+ hSteamNetworkingSockets, cremote, auth, size,
+ k_nSteamNetworkingSend_Reliable, NULL );
+
+ free( auth );
+}
+
static void scores_update(void)
{
vg_log( "scores_update()\n" );
if( cremote_state == k_ESteamNetworkingConnectionState_Connected )
{
/*
- * request updated scores
+ * request updated scores, this does not require any authentication.
*/
netmsg_scores_request req;
req.inetmsg_id = k_inetmsg_scores_request;
hSteamNetworkingSockets, cremote, &req,
sizeof(netmsg_scores_request),
k_nSteamNetworkingSend_Reliable, NULL );
+
+ /*
+ * Send record update, it requires authentication
+ */
+ if( steam_app_ticket_length )
+ {
+ }
}
else
{