mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-03-30 22:29:04 +03:00
All SendMessage overloads have optional laneIndex
This commit is contained in:
parent
f3ee5bec4e
commit
214096e376
@ -99,11 +99,11 @@ namespace Steamworks.Data
|
|||||||
/// Ideally should be using an IntPtr version unless you're being really careful with the byte[] array and
|
/// Ideally should be using an IntPtr version unless you're being really careful with the byte[] array and
|
||||||
/// you're not creating a new one every frame (like using .ToArray())
|
/// you're not creating a new one every frame (like using .ToArray())
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public unsafe Result SendMessage( byte[] data, SendType sendType = SendType.Reliable )
|
public unsafe Result SendMessage( byte[] data, SendType sendType = SendType.Reliable, ushort laneIndex = 0 )
|
||||||
{
|
{
|
||||||
fixed ( byte* ptr = data )
|
fixed ( byte* ptr = data )
|
||||||
{
|
{
|
||||||
return SendMessage( (IntPtr)ptr, data.Length, sendType );
|
return SendMessage( (IntPtr)ptr, data.Length, sendType, laneIndex );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,21 +111,21 @@ namespace Steamworks.Data
|
|||||||
/// Ideally should be using an IntPtr version unless you're being really careful with the byte[] array and
|
/// Ideally should be using an IntPtr version unless you're being really careful with the byte[] array and
|
||||||
/// you're not creating a new one every frame (like using .ToArray())
|
/// you're not creating a new one every frame (like using .ToArray())
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public unsafe Result SendMessage( byte[] data, int offset, int length, SendType sendType = SendType.Reliable )
|
public unsafe Result SendMessage( byte[] data, int offset, int length, SendType sendType = SendType.Reliable, ushort laneIndex = 0 )
|
||||||
{
|
{
|
||||||
fixed ( byte* ptr = data )
|
fixed ( byte* ptr = data )
|
||||||
{
|
{
|
||||||
return SendMessage( (IntPtr)ptr + offset, length, sendType );
|
return SendMessage( (IntPtr)ptr + offset, length, sendType, laneIndex );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This creates a ton of garbage - so don't do anything with this beyond testing!
|
/// This creates a ton of garbage - so don't do anything with this beyond testing!
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public unsafe Result SendMessage( string str, SendType sendType = SendType.Reliable )
|
public unsafe Result SendMessage( string str, SendType sendType = SendType.Reliable, ushort laneIndex = 0 )
|
||||||
{
|
{
|
||||||
var bytes = System.Text.Encoding.UTF8.GetBytes( str );
|
var bytes = System.Text.Encoding.UTF8.GetBytes( str );
|
||||||
return SendMessage( bytes, sendType );
|
return SendMessage( bytes, sendType, laneIndex );
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user