mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-12 22:58:01 +03:00
Merge pull request #524 from HouraiTeahouse/public-lobby-chat
Implement #523: Make Lobby.SendChatBytes public.
This commit is contained in:
commit
1bae585602
@ -140,17 +140,23 @@ namespace Steamworks.Data
|
||||
|
||||
/// <summary>
|
||||
/// Sends bytes the the chat room
|
||||
/// this isn't exposed because there's no way to read raw bytes atm,
|
||||
/// and I figure people can send json if they want something more advanced
|
||||
/// </summary>
|
||||
internal unsafe bool SendChatBytes( byte[] data )
|
||||
public unsafe bool SendChatBytes( byte[] data )
|
||||
{
|
||||
fixed ( byte* ptr = data )
|
||||
{
|
||||
return SteamMatchmaking.Internal.SendLobbyChatMsg( Id, (IntPtr)ptr, data.Length );
|
||||
return SendChatBytesUnsafe( ptr, data.Length );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends bytes the the chat room from a unsafe buffer
|
||||
/// </summary>
|
||||
public unsafe bool SendChatBytesUnsafe( byte* ptr, int length )
|
||||
{
|
||||
return SteamMatchmaking.Internal.SendLobbyChatMsg( Id, (IntPtr)ptr, length );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Refreshes metadata for a lobby you're not necessarily in right now
|
||||
/// you never do this for lobbies you're a member of, only if your
|
||||
|
Loading…
x
Reference in New Issue
Block a user