sot-talos-balance  1.7.0
CNetwork Class Reference

#include <sot/talos_balance/sdk_qualisys/Network.h>

Public Member Functions

 CNetwork ()
 
 ~CNetwork ()
 
bool Connect (const char *pServerAddr, unsigned short nPort)
 
bool Connected () const
 
bool CreateUDPSocket (unsigned short &nUDPPort, bool bBroadcast=false)
 
void Disconnect ()
 
int GetError () const
 
char * GetErrorString ()
 
unsigned short GetUdpBroadcastServerPort ()
 
unsigned short GetUdpServerPort ()
 
bool IsLocalAddress (unsigned int nAddr) const
 
int Receive (char *rtDataBuff, int nDataBufSize, bool bHeader, int nTimeout, unsigned int *ipAddr=nullptr)
 
bool Send (const char *pSendBuf, int nSize)
 
bool SendUDPBroadcast (const char *pSendBuf, int nSize, short nPort, unsigned int nFilterAddr=0)
 

Detailed Description

Definition at line 12 of file Network.h.

Constructor & Destructor Documentation

◆ CNetwork()

CNetwork ( )

Definition at line 45 of file Network.cpp.

References INVALID_SOCKET.

◆ ~CNetwork()

~CNetwork ( )

Definition at line 57 of file Network.cpp.

Member Function Documentation

◆ Connect()

bool Connect ( const char *  pServerAddr,
unsigned short  nPort 
)

Definition at line 87 of file Network.cpp.

References closesocket, and SOCKET_ERROR.

Referenced by CRTProtocol::Connect().

◆ Connected()

bool Connected ( ) const

Definition at line 171 of file Network.cpp.

References INVALID_SOCKET.

Referenced by CRTProtocol::Connected().

◆ CreateUDPSocket()

bool CreateUDPSocket ( unsigned short &  nUDPPort,
bool  bBroadcast = false 
)

◆ Disconnect()

void Disconnect ( )

Definition at line 157 of file Network.cpp.

References closesocket, INVALID_SOCKET, and SD_SEND.

Referenced by CRTProtocol::Disconnect().

◆ GetError()

int GetError ( ) const

Definition at line 514 of file Network.cpp.

Referenced by CRTProtocol::Connect().

◆ GetErrorString()

char * GetErrorString ( )

◆ GetUdpBroadcastServerPort()

unsigned short GetUdpBroadcastServerPort ( )

Definition at line 259 of file Network.cpp.

References GetUdpServerPort().

◆ GetUdpServerPort()

unsigned short GetUdpServerPort ( )

◆ IsLocalAddress()

bool IsLocalAddress ( unsigned int  nAddr) const

Definition at line 520 of file Network.cpp.

Referenced by CRTProtocol::DiscoverRTServer().

◆ Receive()

int Receive ( char *  rtDataBuff,
int  nDataBufSize,
bool  bHeader,
int  nTimeout,
unsigned int *  ipAddr = nullptr 
)

Definition at line 266 of file Network.cpp.

References INVALID_SOCKET, SOCKET_ERROR, and TIMEVAL.

Referenced by CRTProtocol::DiscoverRTServer(), and CRTProtocol::ReceiveRTPacket().

◆ Send()

bool Send ( const char *  pSendBuf,
int  nSize 
)

Definition at line 374 of file Network.cpp.

References SOCKET_ERROR.

Referenced by CRTProtocol::GetErrorString().

◆ SendUDPBroadcast()

bool SendUDPBroadcast ( const char *  pSendBuf,
int  nSize,
short  nPort,
unsigned int  nFilterAddr = 0 
)

Definition at line 393 of file Network.cpp.

References INVALID_SOCKET.

Referenced by CRTProtocol::DiscoverRTServer().


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