Struct steamworks::networking_types::NetworkingMessage [−][src]
pub struct NetworkingMessage<Manager> { /* fields omitted */ }
Implementations
Set the target connection for the connection.
Make sure you don’t close or drop the NetConnection
before sending your message.
Use this with ListenSocket::send_messages
for efficient sending.
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?
The identity of the sender or, the receiver when used with the NetworkingMessages interface.
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,
Message number assigned by the sender. This is not used for outbound messages
Bitmask of k_nSteamNetworkingSend_xxx flags. For received messages, only the k_nSteamNetworkingSend_Reliable bit is valid. For outbound messages, all bits are relevant
Bitmask of k_nSteamNetworkingSend_xxx flags. For received messages, only the k_nSteamNetworkingSend_Reliable bit is valid. For outbound messages, all bits are relevant
Message payload
Set a new buffer for the message.
Returns Err(MessageError::BufferAlreadySet)
if the current buffer is not NULL.
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.
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.