X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=network.h;h=752c6c3c46534e7bf580b5a60ef2c3462e08323e;hb=6b036c10d38e7d691eb0bc06c29235b450c3ff10;hp=de64d44e60a115f2db9d4bf7e997deecf0233c35;hpb=730f202673d6ceb2a5199cf244d5c0bddc064fcf;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/network.h b/network.h index de64d44..752c6c3 100644 --- a/network.h +++ b/network.h @@ -12,6 +12,8 @@ #include "highscores.h" #include "addon_types.h" +#define NETWORK_MAX_REQUESTS 8 + static int network_scores_updated = 0; /* @@ -51,13 +53,24 @@ 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 addon_type type ); +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 ); #endif /* NETWORK_H */