VR-Vantage 3.0.3 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
tracy::Socket Class Reference

Public Member Functions

 Socket ()
 Socket (int sock)
 ~Socket ()
bool Connect (const char *addr, uint16_t port)
bool ConnectBlocking (const char *addr, uint16_t port)
void Close ()
int Send (const void *buf, int len)
int GetSendBufSize ()
int ReadUpTo (void *buf, int len, int timeout)
bool Read (void *buf, int len, int timeout)
template<typename ShouldExit >
bool Read (void *buf, int len, int timeout, ShouldExit exitCb)
bool ReadRaw (void *buf, int len, int timeout)
bool HasData ()
bool IsValid () const
 Socket (const Socket &)
 Socket (Socket &&)
Socketoperator= (const Socket &)
Socketoperator= (Socket &&)

Private Member Functions

int RecvBuffered (void *buf, int len, int timeout)
int Recv (void *buf, int len, int timeout)
bool ReadImpl (char *&buf, int &len, int timeout)

Private Attributes

char * m_buf
char * m_bufPtr
std::atomic< intm_sock
int m_bufLeft
struct addrinfo * m_res
struct addrinfo * m_ptr
int m_connSock

Constructor & Destructor Documentation

tracy::Socket::Socket ( )
tracy::Socket::Socket ( int  sock)
tracy::Socket::~Socket ( )
tracy::Socket::Socket ( const Socket )
tracy::Socket::Socket ( Socket &&  )

Member Function Documentation

bool tracy::Socket::Connect ( const char *  addr,
uint16_t  port 
)
bool tracy::Socket::ConnectBlocking ( const char *  addr,
uint16_t  port 
)
void tracy::Socket::Close ( )
int tracy::Socket::Send ( const void buf,
int  len 
)
int tracy::Socket::GetSendBufSize ( )
int tracy::Socket::ReadUpTo ( void buf,
int  len,
int  timeout 
)
bool tracy::Socket::Read ( void buf,
int  len,
int  timeout 
)
template<typename ShouldExit >
bool tracy::Socket::Read ( void buf,
int  len,
int  timeout,
ShouldExit  exitCb 
)
inline

References ReadImpl().

bool tracy::Socket::ReadRaw ( void buf,
int  len,
int  timeout 
)
bool tracy::Socket::HasData ( )
bool tracy::Socket::IsValid ( ) const
Socket& tracy::Socket::operator= ( const Socket )
Socket& tracy::Socket::operator= ( Socket &&  )
int tracy::Socket::RecvBuffered ( void buf,
int  len,
int  timeout 
)
private
int tracy::Socket::Recv ( void buf,
int  len,
int  timeout 
)
private
bool tracy::Socket::ReadImpl ( char *&  buf,
int len,
int  timeout 
)
private

Referenced by Read().

Member Data Documentation

char* tracy::Socket::m_buf
private
char* tracy::Socket::m_bufPtr
private
std::atomic<int> tracy::Socket::m_sock
private
int tracy::Socket::m_bufLeft
private
struct addrinfo* tracy::Socket::m_res
private
struct addrinfo* tracy::Socket::m_ptr
private
int tracy::Socket::m_connSock
private

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


Copyright © 2005-2023 MAK Technologies. All Rights Reserved (www.mak.com)