/// <summary> /// <para>/ Set a function to receive network-related information that is useful for debugging.</para> /// <para>/ This can be very useful during development, but it can also be useful for troubleshooting</para> /// <para>/ problems with tech savvy end users. If you have a console or other log that customers</para> /// <para>/ can examine, these log messages can often be helpful to troubleshoot network issues.</para> /// <para>/ (Especially any warning/error messages.)</para> /// <para>/</para> /// <para>/ The detail level indicates what message to invoke your callback on. Lower numeric</para> /// <para>/ value means more important, and the value you pass is the lowest priority (highest</para> /// <para>/ numeric value) you wish to receive callbacks for.</para> /// <para>/</para> /// <para>/ Except when debugging, you should only use k_ESteamNetworkingSocketsDebugOutputType_Msg</para> /// <para>/ or k_ESteamNetworkingSocketsDebugOutputType_Warning. For best performance, do NOT</para> /// <para>/ request a high detail level and then filter out messages in your callback. This incurs</para> /// <para>/ all of the expense of formatting the messages, which are then discarded. Setting a high</para> /// <para>/ priority value (low numeric value) here allows the library to avoid doing this work.</para> /// <para>/</para> /// <para>/ IMPORTANT: This may be called from a service thread, while we own a mutex, etc.</para> /// <para>/ Your output function must be threadsafe and fast! Do not make any other</para> /// <para>/ Steamworks calls from within the handler.</para> /// </summary> public static void SetDebugOutputFunction(ESteamNetworkingSocketsDebugOutputType eDetailLevel, FSteamNetworkingSocketsDebugOutput pfnFunc) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamNetworkingUtils_SetDebugOutputFunction(CSteamAPIContext.GetSteamNetworkingUtils(), eDetailLevel, pfnFunc); }
internal void SetDebugOutputFunction(DebugOutputType eDetailLevel, FSteamNetworkingSocketsDebugOutput pfnFunc) { _SetDebugOutputFunction(Self, eDetailLevel, pfnFunc); }
private static extern void _SetDebugOutputFunction(IntPtr self, DebugOutputType eDetailLevel, FSteamNetworkingSocketsDebugOutput pfnFunc);