NET_Datagram(3type)

NAME
NET_Datagram - The data provided for new incoming packets from NET_ReceiveDatagram().

SYNOPSIS
#include <SDL3_net/SDL_net.h>

typedef struct NET_Datagram
{
    NET_Address *addr;  /**< Sender's address. This is unref'd by NET_DestroyDatagram. You only need to ref it if you want to keep it. */
    Uint16 port;  /**< Sender's port. These do not have to come from the same port the receiver is bound to. These are in host byte order, don't byteswap them! */
    Uint8 *buf;  /**< the payload of this datagram. */
    int buflen;  /**< the number of bytes available at `buf`. */
} NET_Datagram;

AVAILABILITY
This datatype is available since SDL_net 3.0.0.

SEE ALSO
NET_ReceiveDatagram(3), NET_DestroyDatagram(3)