Facepunch.Steamworks Wiki

Steamworks.Data.Connection.SendMessage

Syntax

Result SendMessage( System.IntPtr ptr, int size, Data.SendType sendType = Reliable )

Description

This is the best version to use.

Arguments

System.IntPtr ptr
int size
Data.SendType sendType Reliable

Returns

Syntax

Result SendMessage( byte[] data, Data.SendType sendType = Reliable )

Description

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())

Arguments

byte[] data
Data.SendType sendType Reliable

Returns

Syntax

Result SendMessage( byte[] data, int offset, int length, Data.SendType sendType = Reliable )

Description

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())

Arguments

byte[] data
int offset
int length
Data.SendType sendType Reliable

Returns

Syntax

Result SendMessage( string str, Data.SendType sendType = Reliable )

Description

This creates a ton of garbage - so don't do anything with this beyond testing!

Arguments

string str
Data.SendType sendType Reliable

Returns