- SteamAPI_ISteamNetworkingSockets_SendMessageToConnection(
- hSteamNetworkingSockets, cremote, &req, sizeof(netmsg_scores_request),
- k_nSteamNetworkingSend_Reliable, NULL );
-}
-
-static void send_score_update(void)
-{
- vg_info( "Sending scores\n" );
- u32 size = sizeof(netmsg_set_score) +
- 1 * sizeof(struct netmsg_score_record);
-
- netmsg_set_score *setscore = alloca( size );
- setscore->inetmsg_id = k_inetmsg_set_score;
- setscore->record_count = 1;
- setscore->records[0].trackid = 0;
- setscore->records[0].playerid = 0;
- setscore->records[0].points = 1386;
- setscore->records[0].time = 19432;
-
- SteamAPI_ISteamNetworkingSockets_SendMessageToConnection(
- hSteamNetworkingSockets, cremote, setscore, size,
- k_nSteamNetworkingSend_Reliable, NULL );
-}
-
-static void send_nickname(void)
-{
- netmsg_set_nickname nick;
- nick.inetmsg_id = k_inetmsg_set_nickname;
-
- memset( nick.nickname, 0, 10 );
- strcpy( nick.nickname, "real H" );
-
- SteamAPI_ISteamNetworkingSockets_SendMessageToConnection(
- hSteamNetworkingSockets, cremote, &nick, sizeof(netmsg_set_nickname),
- k_nSteamNetworkingSend_Reliable, NULL );
-
- network_name_update = 0;
-}
-
-static void server_routine_update(void)
-{
- send_auth_ticket();
-
- if( network_name_update )
- send_nickname();
-
- send_score_update();
- send_score_request();
-}