|
group2 0.1.0
CSE 125 Group 2
|
A UDP datagram address (server's view of a remote peer). More...
#include <UdpEndpoint.hpp>
Public Member Functions | |
| UdpEndpointAddr ()=default | |
| UdpEndpointAddr (NET_Address *address, Uint16 p) | |
| UdpEndpointAddr (const UdpEndpointAddr &other) | |
| UdpEndpointAddr & | operator= (const UdpEndpointAddr &other) |
| UdpEndpointAddr (UdpEndpointAddr &&other) noexcept | |
| UdpEndpointAddr & | operator= (UdpEndpointAddr &&other) noexcept |
| ~UdpEndpointAddr () | |
| void | release () noexcept |
| Drop the refcount (idempotent). | |
Public Attributes | |
| NET_Address * | addr = nullptr |
| Refcounted SDL_net address. | |
| Uint16 | port = 0 |
| Source/destination port. | |
A UDP datagram address (server's view of a remote peer).
SDL3_net stores the (addr, port) pair as (NET_Address*, Uint16). We hold a refcounted pointer to the address so the same value survives across NET_ReceiveDatagram → NET_DestroyDatagram cycles. The caller owns the lifetime — call release() when discarding.
|
default |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
Drop the refcount (idempotent).
| NET_Address* net::UdpEndpointAddr::addr = nullptr |
Refcounted SDL_net address.
| Uint16 net::UdpEndpointAddr::port = 0 |
Source/destination port.