mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-27 05:58:07 +03:00
Added NetConnection.DetailedStatus
This commit is contained in:
parent
cdeccc5afe
commit
16851f1228
@ -110,6 +110,8 @@ namespace Steamworks
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine( Connection.DetailedStatus() );
|
||||
}
|
||||
|
||||
public override unsafe void OnMessage( IntPtr data, int size, long messageNum, SteamNetworkingMicroseconds recvTime, int channel )
|
||||
|
@ -85,6 +85,16 @@ namespace Steamworks.Data
|
||||
/// </summary>
|
||||
public Result Flush() => SteamNetworkingSockets.Internal.FlushMessagesOnConnection( this );
|
||||
|
||||
public string DetailedStatus()
|
||||
{
|
||||
var sb = Helpers.TakeStringBuilder();
|
||||
|
||||
if ( SteamNetworkingSockets.Internal.GetDetailedConnectionStatus( this, sb, sb.Capacity ) != 0 )
|
||||
return null;
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/*
|
||||
[ThreadStatic]
|
||||
private static SteamNetworkingMessage_t[] messageBuffer;
|
||||
|
Loading…
x
Reference in New Issue
Block a user