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

 UdpEndpointAddr ()=default
 UdpEndpointAddr (NET_Address *address, Uint16 p)
 UdpEndpointAddr (const UdpEndpointAddr &other)
UdpEndpointAddroperator= (const UdpEndpointAddr &other)
 UdpEndpointAddr (UdpEndpointAddr &&other) noexcept
UdpEndpointAddroperator= (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.

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.

Constructor & Destructor Documentation

◆ UdpEndpointAddr() [1/4]

net::UdpEndpointAddr::UdpEndpointAddr ( )
default
Here is the caller graph for this function:

◆ UdpEndpointAddr() [2/4]

net::UdpEndpointAddr::UdpEndpointAddr ( NET_Address * address,
Uint16 p )
inline

◆ UdpEndpointAddr() [3/4]

net::UdpEndpointAddr::UdpEndpointAddr ( const UdpEndpointAddr & other)
inline
Here is the call graph for this function:

◆ UdpEndpointAddr() [4/4]

net::UdpEndpointAddr::UdpEndpointAddr ( UdpEndpointAddr && other)
inlinenoexcept
Here is the call graph for this function:

◆ ~UdpEndpointAddr()

net::UdpEndpointAddr::~UdpEndpointAddr ( )
inline
Here is the call graph for this function:

Member Function Documentation

◆ operator=() [1/2]

UdpEndpointAddr & net::UdpEndpointAddr::operator= ( const UdpEndpointAddr & other)
inline
Here is the call graph for this function:

◆ operator=() [2/2]

UdpEndpointAddr & net::UdpEndpointAddr::operator= ( UdpEndpointAddr && other)
inlinenoexcept
Here is the call graph for this function:

◆ 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: