mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-26 06:35:49 +03:00
Merge pull request #548 from sschoener/patch-1
Expose message size in IsP2PPacketAvailable
This commit is contained in:
commit
d5b49fdeab
@ -59,7 +59,7 @@ internal static void InstallEvents( bool server )
|
||||
public static bool CloseP2PSessionWithUser( SteamId user ) => Internal.CloseP2PSessionWithUser( user );
|
||||
|
||||
/// <summary>
|
||||
/// Checks if a P2P packet is available to read, and gets the size of the message if there is one.
|
||||
/// Checks if a P2P packet is available to read.
|
||||
/// </summary>
|
||||
public static bool IsP2PPacketAvailable( int channel = 0 )
|
||||
{
|
||||
@ -67,6 +67,15 @@ public static bool IsP2PPacketAvailable( int channel = 0 )
|
||||
return Internal.IsP2PPacketAvailable( ref _, channel );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if a P2P packet is available to read, and gets the size of the message if there is one.
|
||||
/// </summary>
|
||||
public static bool IsP2PPacketAvailable( out uint msgSize, int channel = 0 )
|
||||
{
|
||||
msgSize = 0;
|
||||
return Internal.IsP2PPacketAvailable( ref msgSize, channel );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads in a packet that has been sent from another user via SendP2PPacket..
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user