X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=network.h;h=6af51af6ccf94de2896f35e056ed803d8400c34b;hb=ea41214530c8f3517b59ccbf7fad9f3bb159684a;hp=bf2ccf8983fd88897863a0a85fac2a710a24b206;hpb=304647a7672165dd35ffe54884ed9aedcc9bf363;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/network.h b/network.h index bf2ccf8..6af51af 100644 --- a/network.h +++ b/network.h @@ -1,11 +1,13 @@ /* - * Copyright (C) 2021-2022 Mt.ZERO Software, Harry Godden - All Rights Reserved + * Copyright (C) 2021-2024 Mt.ZERO Software, Harry Godden - All Rights Reserved * All trademarks are property of their respective owners */ #pragma once #include "vg/vg_platform.h" #include "vg/vg_steam_networking.h" +#include "vg/vg_mem_pool.h" +#include "vg/vg_msg.h" #include "steam.h" #include "network_common.h" #include "network_msg.h" @@ -62,7 +64,9 @@ struct network_client *request_buffer; vg_pool request_pool; - char server_adress[64]; + SteamNetworkingIPAddr ip; + char host_port[8], host_adress[256]; + bool ip_resolved; enum server_intent { k_server_intent_offline, @@ -85,6 +89,7 @@ void chat_send_message( const char *message ); void render_server_status_gui(void); void network_status_string( vg_str *str, u32 *colour ); void network_send_region(void); +void network_set_host( const char *host_str, const char *port_str ); static inline int network_connected(void) {