From bd0115c907c82b4a9faf332a201e6e8065b56866 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Sun, 20 Feb 2022 15:02:40 -0500 Subject: enet_peer_send note about failure and enet_packet_destroy --- peer.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'peer.c') diff --git a/peer.c b/peer.c index f6c6ea8..cb810c6 100644 --- a/peer.c +++ b/peer.c @@ -90,6 +90,11 @@ enet_peer_throttle (ENetPeer * peer, enet_uint32 rtt) } /** Queues a packet to be sent. + + On success, ENet will assume ownership of the packet, and so enet_packet_destroy + should not be called on it thereafter. On failure, the caller still must destroy + the packet on its own as ENet has not queued the packet. + @param peer destination for the packet @param channelID channel on which to send @param packet packet to send -- cgit v1.2.3