|
net_socket_t | m_socket |
|
int | m_rcvbuf |
|
int | m_errno |
|
int | m_attempt |
|
struct timeval | m_timeout |
|
|
char * | m_buffer |
|
char * | m_bufptr |
|
size_t | m_buflen |
|
size_t | m_rcvlen |
|
Definition at line 66 of file socket.h.
◆ Connect()
bool TcpSocket::Connect |
( |
const char * |
server, |
|
|
unsigned |
port, |
|
|
int |
rcvbuf |
|
) |
| |
|
virtual |
Try to connect the socket to an address name, port.
- Parameters
-
server | the destination address name |
port | the destination port |
rcvbuf | the size of read buffer, else 0 for SOCKET_RCVBUF_MINSIZE |
- Returns
- true on success, else false
Reimplemented in NSROOT::SecureSocket.
Definition at line 189 of file socket.cpp.
◆ Disconnect()
void TcpSocket::Disconnect |
( |
| ) |
|
|
virtual |
◆ GetErrNo()
int NSROOT::TcpSocket::GetErrNo |
( |
| ) |
const |
|
inline |
- Returns
- the last error occuring on call
Definition at line 76 of file socket.h.
◆ GetHandle()
net_socket_t NSROOT::TcpSocket::GetHandle |
( |
| ) |
const |
|
inline |
- Returns
- the socket handle
Definition at line 131 of file socket.h.
◆ GetHostAddrInfo()
std::string TcpSocket::GetHostAddrInfo |
( |
| ) |
|
- Returns
- the address string of this host
Definition at line 462 of file socket.cpp.
◆ GetMyHostName()
const char * TcpSocket::GetMyHostName |
( |
| ) |
|
|
static |
◆ IsValid()
bool TcpSocket::IsValid |
( |
| ) |
const |
|
virtual |
◆ Listen()
int TcpSocket::Listen |
( |
timeval * |
timeout | ) |
|
Check for read readiness. It returns -1 for errors, 0 for occurred timeout, and >0 when incoming data are ready to read.
- Parameters
-
- Returns
- an int for status
Definition at line 444 of file socket.cpp.
◆ ReceiveData()
size_t TcpSocket::ReceiveData |
( |
void * |
buf, |
|
|
size_t |
n |
|
) |
| |
|
virtual |
Read data from the socket.
- Parameters
-
buf | the pointer to write received data |
n | the number of byte to read |
- Returns
- the number of received byte
Implements NSROOT::NetSocket.
Reimplemented in NSROOT::SecureSocket.
Definition at line 318 of file socket.cpp.
◆ SendData()
bool TcpSocket::SendData |
( |
const char * |
buf, |
|
|
size_t |
size |
|
) |
| |
|
virtual |
◆ SetReadAttempt()
void NSROOT::TcpSocket::SetReadAttempt |
( |
int |
n | ) |
|
|
inline |
The documentation for this class was generated from the following files:
- /home/jlb/src/janbar/PVR/cppmythlib/cppmyth/src/private/socket.h
- /home/jlb/src/janbar/PVR/cppmythlib/cppmyth/src/private/socket.cpp