Open 3D Engine GridMate API Reference  2205.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Public Types | Public Member Functions | List of all members
GridMate::SocketAddressInfo Class Reference

#include <SocketDriver.h>

Public Types

enum  AdditionalOptionFlags { None = 0x00, Passive = 0x01, NumericHost = 0x02 }
 

Public Member Functions

void Reset ()
 
bool Resolve (const char *address, AZ::u16 port, Driver::BSDSocketFamilyType familyType, bool isDatagram, AdditionalOptionFlags flags)
 
const addrinfo * GetAddressInfo () const
 
AZ::u16 RetrieveSystemAssignedPort (SocketDriverCommon::SocketType socket) const
 

Detailed Description

Utility class to help retrieve socket address information

Member Function Documentation

◆ GetAddressInfo()

const addrinfo* GridMate::SocketAddressInfo::GetAddressInfo ( ) const
inline

If Resolve() is True, then this returns the address information requested to resolve

◆ Resolve()

bool GridMate::SocketAddressInfo::Resolve ( const char *  address,
AZ::u16  port,
Driver::BSDSocketFamilyType  familyType,
bool  isDatagram,
AdditionalOptionFlags  flags 
)

Resolves the an address for either the local host machine (when address is nullptr) or a remote address where address points to a valid string

Parameters
addresswhen nullptr it we will assume "any address".
portWhen left 0, we use implicit bind (assigned by the system); in native Endian
familyTypefamily type, for the BSD socket it can be BSD_AF_INET or BSD_AF_INET6
isDatagramWhen True then the address hint with be SOCK_DGRAM otherwise SOCK_STREAM
flagscombined AI_* flags to use as a hints

◆ RetrieveSystemAssignedPort()

AZ::u16 GridMate::SocketAddressInfo::RetrieveSystemAssignedPort ( SocketDriverCommon::SocketType  socket) const

If Resolve() is True and valid socket, return the assigned port after a succesful bind() call


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