![]() |
nalchi
|
Socket extensions flat API. More...
#include "nalchi/socket_extensions.hpp"
Go to the source code of this file.
Functions | |
void | nalchi_socket_extensions_unicast (ISteamNetworkingSockets *sockets, HSteamNetConnection connection, nalchi::shared_payload payload, int logical_bytes_length, int send_flags, std::int64_t *out_message_number_or_result, std::uint16_t lane, std::int64_t user_data) |
Unicasts a shared_payload to a connection. | |
void | nalchi_socket_extensions_multicast (ISteamNetworkingSockets *sockets, unsigned connections_count, const HSteamNetConnection *connections, nalchi::shared_payload payload, int logical_bytes_length, int send_flags, std::int64_t *out_message_number_or_result, std::uint16_t lane, std::int64_t user_data) |
Multicasts a shared_payload to the connections. | |
Socket extensions flat API.
void nalchi_socket_extensions_multicast | ( | ISteamNetworkingSockets * | sockets, |
unsigned | connections_count, | ||
const HSteamNetConnection * | connections, | ||
nalchi::shared_payload | payload, | ||
int | logical_bytes_length, | ||
int | send_flags, | ||
std::int64_t * | out_message_number_or_result, | ||
std::uint16_t | lane, | ||
std::int64_t | user_data ) |
Multicasts a shared_payload
to the connections.
This function uses ISteamNetworkingSockets::SendMessages()
under the hood, but it shares the payload between them.
So, it's more efficient if you send a same message to a lot of connections with this.
connections_count | Number of connections . |
connections | Connections to multicast to. |
payload | Payload to send. |
logical_bytes_length | Logical number of bytes of the payload. |
send_flags | Send flags. See message sending flags on the Steamworks docs. |
out_message_number_or_result | Optional pointer to receive the message number if successful, or a negative EResult value if failed. |
lane | Optional lane index. See ISteamNetworkingSockets::ConfigureConnectionLanes for details. |
user_data | Optional user data. |
void nalchi_socket_extensions_unicast | ( | ISteamNetworkingSockets * | sockets, |
HSteamNetConnection | connection, | ||
nalchi::shared_payload | payload, | ||
int | logical_bytes_length, | ||
int | send_flags, | ||
std::int64_t * | out_message_number_or_result, | ||
std::uint16_t | lane, | ||
std::int64_t | user_data ) |
Unicasts a shared_payload
to a connection.
This function is pretty similar to the ISteamNetworkingSockets::SendMessageToConnection()
, but it's for the nalchi::shared_payload
.
But, it uses ISteamNetworkingSockets::SendMessages()
under the hood, so the result is returns with out_message_number_or_result
instead of a return value.
connection | Connection to send to. |
payload | Payload to send. |
logical_bytes_length | Logical number of bytes of the payload. |
send_flags | Send flags. See message sending flags on the Steamworks docs. |
out_message_number_or_result | Optional pointer to receive the message number if successful, or a negative EResult value if failed. |
lane | Optional lane index. See ISteamNetworkingSockets::ConfigureConnectionLanes for details. |
user_data | Optional user data. |