group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
net::UdpEndpointAddr Struct Reference

A UDP datagram address (server's view of a remote peer). More...

#include <UdpEndpoint.hpp>

Public Member Functions

void release () noexcept
 Drop the refcount (idempotent).

Public Attributes

NET_Address * addr = nullptr
 Refcounted SDL_net address.
Uint16 port = 0
 Source/destination port.

Detailed Description

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_ReceiveDatagramNET_DestroyDatagram cycles. The caller owns the lifetime — call release() when discarding.

Member Function Documentation

◆ release()

void net::UdpEndpointAddr::release ( )
inlinenoexcept

Drop the refcount (idempotent).

Here is the caller graph for this function:

Member Data Documentation

◆ addr

NET_Address* net::UdpEndpointAddr::addr = nullptr

Refcounted SDL_net address.

◆ port

Uint16 net::UdpEndpointAddr::port = 0

Source/destination port.


The documentation for this struct was generated from the following file: