SteamNetworkingMessage_t

A message that has been received.

Members

Functions

GetChannel
int GetChannel()
Undocumented in source. Be warned that the author may not have intended to support it.
GetConnection
HSteamNetConnection GetConnection()
Undocumented in source. Be warned that the author may not have intended to support it.
GetConnectionUserData
long GetConnectionUserData()
Undocumented in source. Be warned that the author may not have intended to support it.
GetData
const(void*) GetData()
Undocumented in source. Be warned that the author may not have intended to support it.
GetMessageNumber
long GetMessageNumber()
Undocumented in source. Be warned that the author may not have intended to support it.
GetSize
uint GetSize()
Undocumented in source. Be warned that the author may not have intended to support it.
GetTimeReceived
SteamNetworkingMicroseconds GetTimeReceived()
Undocumented in source. Be warned that the author may not have intended to support it.
Release
void Release()

You MUST call this when you're done with the object, to free up memory, etc.

Variables

_pad1__
ushort _pad1__;
Undocumented in source.
m_cbSize
int m_cbSize;

Size of the payload.

m_conn
HSteamNetConnection 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

m_identityPeer
SteamNetworkingIdentity 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?

m_idxLane
ushort m_idxLane;

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

m_nChannel
int m_nChannel;

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

m_nConnUserData
long m_nConnUserData;

For messages received on connections, this is the user data associated with the connection.

m_nFlags
int 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

m_nMessageNumber
long 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.

m_nUserData
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.)

m_pData
void* m_pData;

Message payload

m_pfnFreeData
void function(SteamNetworkingMessage_t*) m_pfnFreeData;

Function used to free up m_pData. This mechanism exists so that apps can create messages with buffers allocated from their own heap, and pass them into the library. This function will usually be something like:

m_pfnRelease
void function(SteamNetworkingMessage_t*) m_pfnRelease;

Function to used to decrement the internal reference count and, if it's zero, release the message. You should not set this function pointer, or need to access this directly! Use the Release() function instead!

m_usecTimeReceived
SteamNetworkingMicroseconds m_usecTimeReceived;

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

Meta