X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=network.h;h=2916ad94a824f6f9a5d543daa2e1e319d8ac14ec;hb=f6bc1299d5b30e1aba87e6ce084bcd7eed22975f;hp=bb019fb7b9e39bb3ec0683d9bcaa3b191e58ae0e;hpb=b1f5771eda7a9788b86604a4368eb83babdf486d;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/network.h b/network.h index bb019fb..2916ad9 100644 --- a/network.h +++ b/network.h @@ -10,6 +10,9 @@ #include "steam.h" #include "network_msg.h" #include "highscores.h" +#include "addon_types.h" + +#define NETWORK_MAX_REQUESTS 8 static int network_scores_updated = 0; @@ -50,12 +53,26 @@ struct { u32 retries; i32 network_info; + + struct network_request { + vg_pool_node poolnode; + void (*callback)( netmsg_request *res, vg_msg *body ); + f64 sendtime; + } + *request_buffer; + vg_pool request_pool; } static network_client = { - .state = k_ESteamNetworkingConnectionState_None, .auth_mode = eServerModeAuthentication, + .state = k_ESteamNetworkingConnectionState_None, }; static int packet_minsize( SteamNetworkingMessage_t *msg, u32 size ); +static void network_send_item( enum netmsg_playeritem_type type ); +static void network_request_scoreboard( const char *mod_uid, + const char *route_uid, + u32 week ); +static void network_publish_laptime( const char *mod_uid, + const char *route_uid, f64 lap_time ); #endif /* NETWORK_H */