X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=network.h;h=6af51af6ccf94de2896f35e056ed803d8400c34b;hb=ea41214530c8f3517b59ccbf7fad9f3bb159684a;hp=7500c8800552619d94af1d6ac33e20473aad4e3f;hpb=5f6a4f9df6c8accc89f1920bfe9ace3cbac4c4b6;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/network.h b/network.h index 7500c88..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" @@ -51,6 +53,7 @@ struct network_client u32 retries; i32 network_info; + i32 auto_connect; struct network_request { vg_pool_node poolnode; @@ -61,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, @@ -84,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) {