SDL Wiki
[ front page | index | search | recent changes | git repo | offline html ]
(This function is part of SDL_net, a separate library from SDL.)

NET_Datagram

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

Header File

Defined in <SDL3_net/SDL_net.h>

Syntax

typedef struct NET_Datagram
{
    NET_Address *addr;  /**< this is unref'd by NET_DestroyDatagram. You only need to ref it if you want to keep it. */
    Uint16 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;

Version

This datatype is available since SDL_net 3.0.0.

See Also


CategoryAPI, CategoryAPIStruct, CategorySDLNet


[ edit | delete | history | feedback | raw ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.