/// <summary>
        /// If you need ping information straight away, wait on this. It will return
        /// immediately if you already have up to date ping data
        /// </summary>
        public static async Task WaitForPingDataAsync(float maxAgeInSeconds = 60 * 5)
        {
            if (Internal.CheckPingDataUpToDate(maxAgeInSeconds))
            {
                return;
            }

            SteamRelayNetworkStatus_t status = default;

            while (Internal.GetRelayNetworkStatus(ref status) != SteamNetworkingAvailability.Current)
            {
                await Task.Delay(10);
            }
        }
 /// <summary>
 /// <para>/ Fetch current status of the relay network.</para>
 /// <para>/</para>
 /// <para>/ SteamRelayNetworkStatus_t is also a callback.  It will be triggered on</para>
 /// <para>/ both the user and gameserver interfaces any time the status changes, or</para>
 /// <para>/ ping measurement starts or stops.</para>
 /// <para>/</para>
 /// <para>/ SteamRelayNetworkStatus_t::m_eAvail is returned.  If you want</para>
 /// <para>/ more details, you can pass a non-NULL value.</para>
 /// </summary>
 public static ESteamNetworkingAvailability GetRelayNetworkStatus(out SteamRelayNetworkStatus_t pDetails)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamNetworkingUtils_GetRelayNetworkStatus(CSteamAPIContext.GetSteamNetworkingUtils(), out pDetails));
 }
        internal SteamNetworkingAvailability GetRelayNetworkStatus(ref SteamRelayNetworkStatus_t pDetails)
        {
            var returnValue = _GetRelayNetworkStatus(Self, ref pDetails);

            return(returnValue);
        }
 private static extern SteamNetworkingAvailability _GetRelayNetworkStatus(IntPtr self, ref SteamRelayNetworkStatus_t pDetails);
Example #5
0
        public static IntPtr AllocateMessage(int cbAllocateBuffer) => default;         // 0x00000001807A9250-0x00000001807A92A0

        public static ESteamNetworkingAvailability GetRelayNetworkStatus(out SteamRelayNetworkStatus_t pDetails)
        {
            pDetails = default;
            return(default);