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 &&) |
| Socket & | operator= (const Socket &) |
| Socket & | operator= (Socket &&) |
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 |
( |
| ) |
|
template<typename ShouldExit >
| bool tracy::Socket::Read |
( |
void * |
buf, |
|
|
int |
len, |
|
|
int |
timeout, |
|
|
ShouldExit |
exitCb |
|
) |
| |
|
inline |
| bool tracy::Socket::HasData |
( |
| ) |
|
| bool tracy::Socket::IsValid |
( |
| ) |
const |
| int tracy::Socket::RecvBuffered |
( |
void * |
buf, |
|
|
int |
len, |
|
|
int |
timeout |
|
) |
| |
|
private |
| bool tracy::Socket::ReadImpl |
( |
char *& |
buf, |
|
|
int & |
len, |
|
|
int |
timeout |
|
) |
| |
|
private |
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: