|
|
| UdpSocket (const UdpSocket &) |
|
UdpSocket & | operator= (const UdpSocket &) |
Definition at line 250 of file socket.h.
◆ UdpSocket() [1/2]
◆ UdpSocket() [2/2]
| UdpSocket::UdpSocket |
( |
size_t | bufferSize | ) |
|
◆ ~UdpSocket()
| UdpSocket::~UdpSocket |
( |
| ) |
|
|
virtual |
◆ GetErrNo()
| int NSROOT::UdpSocket::GetErrNo |
( |
| ) |
const |
|
inline |
- Returns
- the last error occuring on call
Definition at line 260 of file socket.h.
◆ GetHandle()
| net_socket_t NSROOT::UdpSocket::GetHandle |
( |
| ) |
const |
|
inline |
- Returns
- the socket handle
Definition at line 324 of file socket.h.
◆ GetRemoteAddrInfo()
| std::string UdpSocket::GetRemoteAddrInfo |
( |
| ) |
const |
- Returns
- the address string of the remote host
Definition at line 1062 of file socket.cpp.
◆ IsValid()
| bool UdpSocket::IsValid |
( |
| ) |
const |
◆ Open() [1/2]
| bool UdpSocket::Open |
( |
SOCKET_AF_t | af, |
|
|
bool | broadcast = false ) |
Open the socket.
- Parameters
-
| af | the protocol |
| broadcast | enable broadcast permission |
- Returns
- true on success, else false
Definition at line 859 of file socket.cpp.
References IsValid().
◆ Open() [2/2]
| bool UdpSocket::Open |
( |
SOCKET_AF_t | af, |
|
|
const char * | target, |
|
|
unsigned | port ) |
Open the socket and configure the given destination.
- Parameters
-
| af | the protocol |
| target | the address name of destination |
| port | |
- Returns
- true on success, else false
Definition at line 854 of file socket.cpp.
References Open(), and SetAddress().
Referenced by Open().
◆ ReceiveData()
| size_t UdpSocket::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.
Definition at line 990 of file socket.cpp.
References IsValid().
◆ SendData()
| bool UdpSocket::SendData |
( |
const char * | buf, |
|
|
size_t | size ) |
|
virtual |
Send data into the socket.
- Parameters
-
| buf | the pointer to data |
| size | the number of byte to send |
- Returns
- true when succeeded, else false
Implements NSROOT::NetSocket.
Definition at line 973 of file socket.cpp.
References IsValid().
◆ SetAddress()
| bool UdpSocket::SetAddress |
( |
const char * | target, |
|
|
unsigned | port ) |
Configure the destination.
- Parameters
-
| target | the address name of destination |
| port | |
- Returns
- true on success, else false
Definition at line 892 of file socket.cpp.
References IsValid().
Referenced by Open().
◆ SetMulticastTTL()
| bool UdpSocket::SetMulticastTTL |
( |
int | multicastTTL | ) |
|
Configure hop limit value to be used for multicast packets on the opened socket.
- Parameters
-
- Returns
- true on success, else false
Definition at line 934 of file socket.cpp.
References IsValid().
◆ m_addr
◆ m_buffer
| char* NSROOT::UdpSocket::m_buffer |
|
private |
◆ m_buflen
| size_t NSROOT::UdpSocket::m_buflen |
|
private |
◆ m_bufptr
| char* NSROOT::UdpSocket::m_bufptr |
|
private |
◆ m_errno
| int NSROOT::UdpSocket::m_errno |
|
private |
◆ m_from
◆ m_rcvlen
| size_t NSROOT::UdpSocket::m_rcvlen |
|
private |
◆ m_socket
| net_socket_t NSROOT::UdpSocket::m_socket |
|
private |
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