NetworkUdpBoundSocketInterface Class Reference

#include <network_ip_udp.h>

Inheritance diagram for NetworkUdpBoundSocketInterface:

Detailed Description

A UDP network socket that is bound to a local address and thus able to receive data.

Public Member Functions

MAXON_METHOD Result< void > JoinMulticastGroup (const NetworkIpAddr &groupAddress)
 
MAXON_METHOD Result< void > LeaveMulticastGroup (const NetworkIpAddr &groupAddress)
 
MAXON_METHOD NetworkIpAddrPort GetLocalAddress () const
 

Private Member Functions

 MAXON_INTERFACE (NetworkUdpBoundSocketInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.networkudpboundsocket")
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( NetworkUdpBoundSocketInterface  ,
MAXON_REFERENCE_NORMAL  ,
"net.maxon.interface.networkudpboundsocket"   
)
private

◆ JoinMulticastGroup()

MAXON_METHOD Result<void> JoinMulticastGroup ( const NetworkIpAddr groupAddress)

Joins a multicast group. The given groupAddress must be a valid multicast address and its protocol must match that of the socket (i.e. no mixing of IPv4 and IPv6); otherwise, an error will be returned.

◆ LeaveMulticastGroup()

MAXON_METHOD Result<void> LeaveMulticastGroup ( const NetworkIpAddr groupAddress)

Leaves a multicast group. Results in an error if the group was not previously joined.

◆ GetLocalAddress()

MAXON_METHOD NetworkIpAddrPort GetLocalAddress ( ) const

Returns the local address this socket is bound to. May be a wildcard address.