Table of Contents

Struct SteamNetworkingMessage

Namespace
MarymoorStudios.Core.Steamworks
Assembly
MarymoorStudios.Core.Steamworks.dll
public struct SteamNetworkingMessage
Inherited Members

Fields

m_conn

For messages received on connections: what connection did this come from? For outgoing messages: what connection to send it to? Not used when using the ISteamNetworkingMessages interface

public HSteamNetConnection m_conn

Field Value

HSteamNetConnection

m_identityPeer

For inbound messages: Who sent this to us? For outbound messages on connections: not used. For outbound messages on the ad-hoc ISteamNetworkingMessages interface: who should we send this to?

public SteamNetworkingIdentity m_identityPeer

Field Value

SteamNetworkingIdentity

m_idxLane

For outbound messages, which lane to use? See ISteamNetworkingSockets::ConfigureConnectionLanes. For inbound messages, what lane was the message received on?

public ushort m_idxLane

Field Value

ushort

m_nChannel

When using ISteamNetworkingMessages, the channel number the message was received on (Not used for messages sent or received on "connections")

public int m_nChannel

Field Value

int

m_nConnUserData

For messages received on connections, this is the user data associated with the connection. This is usually the same as calling GetConnection() and then fetching the user data associated with that connection, but for the following subtle differences: - This user data will match the connection's user data at the time is captured at the time the message is returned by the API. If you subsequently change the userdata on the connection, this won't be updated. - This is an inline call, so it's much faster. - You might have closed the connection, so fetching the user data would not be possible. Not used when sending messages.

public long m_nConnUserData

Field Value

long

m_nFlags

Bitmask of k_nSteamNetworkingSend_xxx flags. For received messages, only the k_nSteamNetworkingSend_Reliable bit is valid. For outbound messages, all bits are relevant

public int m_nFlags

Field Value

int

m_nMessageNumber

Message number assigned by the sender. This is not used for outbound messages. Note that if multiple lanes are used, each lane has its own message numbers, which are assigned sequentially, so messages from different lanes will share the same numbers.

public long m_nMessageNumber

Field Value

long

m_nUserData

Arbitrary user data that you can use when sending messages using ISteamNetworkingUtils::AllocateMessage and ISteamNetworkingSockets::SendMessage. (The callback you set in m_pfnFreeData might use this field.) Not used for received messages.

public long m_nUserData

Field Value

long

m_usecTimeReceived

Local timestamp when the message was received Not used for outbound messages.

public SteamNetworkingMicroseconds m_usecTimeReceived

Field Value

SteamNetworkingMicroseconds

Properties

Span

Message payload (as a span).

public ReadOnlySpan<byte> Span { get; }

Property Value

ReadOnlySpan<byte>

Methods

Release()

public readonly void Release()