Nexus Engine  v0.0.1
Loading...
Searching...
No Matches
Nexus::Network::UDPSocket Class Referenceexport

Public Member Functions

 UDPSocket ()=default
 UDPSocket (const UDPSocket &)=delete
UDPSocketoperator= (const UDPSocket &)=delete
 UDPSocket (UDPSocket &&) noexcept=default
UDPSocketoperator= (UDPSocket &&) noexcept=default
bool Bind (uint16 port)
void Close ()
bool IsOpen () const noexcept
bool Send (const NetworkAddress &destination, std::span< const byte > data)
std::optional< UDPMessageReceive (std::optional< NetworkError > &outError)
 Returns one datagram. Call repeatedly until it returns nullopt.

Constructor & Destructor Documentation

◆ UDPSocket() [1/3]

Nexus::Network::UDPSocket::UDPSocket ( )
default

◆ UDPSocket() [2/3]

Nexus::Network::UDPSocket::UDPSocket ( const UDPSocket & )
delete

◆ UDPSocket() [3/3]

Nexus::Network::UDPSocket::UDPSocket ( UDPSocket && )
defaultnoexcept

Member Function Documentation

◆ Bind()

bool Nexus::Network::UDPSocket::Bind ( uint16 port)

◆ Close()

void Nexus::Network::UDPSocket::Close ( )

◆ IsOpen()

bool Nexus::Network::UDPSocket::IsOpen ( ) const
nodiscardnoexcept

◆ operator=() [1/2]

UDPSocket & Nexus::Network::UDPSocket::operator= ( const UDPSocket & )
delete

◆ operator=() [2/2]

UDPSocket & Nexus::Network::UDPSocket::operator= ( UDPSocket && )
defaultnoexcept

◆ Receive()

std::optional< UDPMessage > Nexus::Network::UDPSocket::Receive ( std::optional< NetworkError > & outError)
nodiscard

Returns one datagram. Call repeatedly until it returns nullopt.

◆ Send()

bool Nexus::Network::UDPSocket::Send ( const NetworkAddress & destination,
std::span< const byte > data )

The documentation for this class was generated from the following files: