mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-27 14:08:06 +03:00
Added NetConnection.DetailedStatus
This commit is contained in:
parent
cdeccc5afe
commit
16851f1228
@ -110,6 +110,8 @@ namespace Steamworks
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Console.WriteLine( Connection.DetailedStatus() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public override unsafe void OnMessage( IntPtr data, int size, long messageNum, SteamNetworkingMicroseconds recvTime, int channel )
|
public override unsafe void OnMessage( IntPtr data, int size, long messageNum, SteamNetworkingMicroseconds recvTime, int channel )
|
||||||
|
@ -85,6 +85,16 @@ namespace Steamworks.Data
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public Result Flush() => SteamNetworkingSockets.Internal.FlushMessagesOnConnection( this );
|
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]
|
[ThreadStatic]
|
||||||
private static SteamNetworkingMessage_t[] messageBuffer;
|
private static SteamNetworkingMessage_t[] messageBuffer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user