diff --git a/Plugins/Steamworks.NET/autogen/NativeMethods.cs b/Plugins/Steamworks.NET/autogen/NativeMethods.cs index 4d52014a..6151a6fd 100644 --- a/Plugins/Steamworks.NET/autogen/NativeMethods.cs +++ b/Plugins/Steamworks.NET/autogen/NativeMethods.cs @@ -2131,6 +2131,9 @@ internal static class NativeMethods { [DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_AllocateMessage", CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr ISteamNetworkingUtils_AllocateMessage(IntPtr instancePtr, int cbAllocateBuffer); + [DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_InitRelayNetworkAccess", CallingConvention = CallingConvention.Cdecl)] + public static extern void ISteamNetworkingUtils_InitRelayNetworkAccess(IntPtr instancePtr); + [DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetRelayNetworkStatus", CallingConvention = CallingConvention.Cdecl)] public static extern ESteamNetworkingAvailability ISteamNetworkingUtils_GetRelayNetworkStatus(IntPtr instancePtr, out SteamRelayNetworkStatus_t pDetails); diff --git a/Plugins/Steamworks.NET/autogen/isteamgameservernetworkingutils.cs b/Plugins/Steamworks.NET/autogen/isteamgameservernetworkingutils.cs index c79c93fb..4dce6ca2 100644 --- a/Plugins/Steamworks.NET/autogen/isteamgameservernetworkingutils.cs +++ b/Plugins/Steamworks.NET/autogen/isteamgameservernetworkingutils.cs @@ -39,6 +39,35 @@ public static IntPtr AllocateMessage(int cbAllocateBuffer) { return NativeMethods.ISteamNetworkingUtils_AllocateMessage(CSteamGameServerAPIContext.GetSteamNetworkingUtils(), cbAllocateBuffer); } + /// + /// Access to Steam Datagram Relay (SDR) network + /// Initialization and status check + /// / If you know that you are going to be using the relay network (for example, + /// / because you anticipate making P2P connections), call this to initialize the + /// / relay network. If you do not call this, the initialization will + /// / be delayed until the first time you use a feature that requires access + /// / to the relay network, which will delay that first access. + /// / + /// / You can also call this to force a retry if the previous attempt has failed. + /// / Performing any action that requires access to the relay network will also + /// / trigger a retry, and so calling this function is never strictly necessary, + /// / but it can be useful to call it a program launch time, if access to the + /// / relay network is anticipated. + /// / + /// / Use GetRelayNetworkStatus or listen for SteamRelayNetworkStatus_t + /// / callbacks to know when initialization has completed. + /// / Typically initialization completes in a few seconds. + /// / + /// / Note: dedicated servers hosted in known data centers do *not* need + /// / to call this, since they do not make routing decisions. However, if + /// / the dedicated server will be using P2P functionality, it will act as + /// / a "client" and this should be called. + /// + public static void InitRelayNetworkAccess() { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamNetworkingUtils_InitRelayNetworkAccess(CSteamGameServerAPIContext.GetSteamNetworkingUtils()); + } + /// /// / Fetch current status of the relay network. /// / diff --git a/Plugins/Steamworks.NET/autogen/isteamnetworkingutils.cs b/Plugins/Steamworks.NET/autogen/isteamnetworkingutils.cs index 4f7a2760..3e8aa885 100644 --- a/Plugins/Steamworks.NET/autogen/isteamnetworkingutils.cs +++ b/Plugins/Steamworks.NET/autogen/isteamnetworkingutils.cs @@ -39,6 +39,35 @@ public static IntPtr AllocateMessage(int cbAllocateBuffer) { return NativeMethods.ISteamNetworkingUtils_AllocateMessage(CSteamAPIContext.GetSteamNetworkingUtils(), cbAllocateBuffer); } + /// + /// Access to Steam Datagram Relay (SDR) network + /// Initialization and status check + /// / If you know that you are going to be using the relay network (for example, + /// / because you anticipate making P2P connections), call this to initialize the + /// / relay network. If you do not call this, the initialization will + /// / be delayed until the first time you use a feature that requires access + /// / to the relay network, which will delay that first access. + /// / + /// / You can also call this to force a retry if the previous attempt has failed. + /// / Performing any action that requires access to the relay network will also + /// / trigger a retry, and so calling this function is never strictly necessary, + /// / but it can be useful to call it a program launch time, if access to the + /// / relay network is anticipated. + /// / + /// / Use GetRelayNetworkStatus or listen for SteamRelayNetworkStatus_t + /// / callbacks to know when initialization has completed. + /// / Typically initialization completes in a few seconds. + /// / + /// / Note: dedicated servers hosted in known data centers do *not* need + /// / to call this, since they do not make routing decisions. However, if + /// / the dedicated server will be using P2P functionality, it will act as + /// / a "client" and this should be called. + /// + public static void InitRelayNetworkAccess() { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamNetworkingUtils_InitRelayNetworkAccess(CSteamAPIContext.GetSteamNetworkingUtils()); + } + /// /// / Fetch current status of the relay network. /// /