22 open (
const int domain_)
24 trace(
"UDPSocket::open");
41 trace(
"UDPSocket::close()");
54 trace(
"UDPSocket::bind");
#define trace(s)
trace() is used to trace function call chain in C++ program.
Class UDPSocket is an implementation of UNIX domain socket that is the base class for more specialize...
virtual SA * getAddress() const =0
Retrieve pointer to the address structure.
virtual const int getLength() const =0
Return length of the underlying address structure.
int m_type
Socket domain type.
void setstate(iostate flag_)
Set socket state to flag_ by adding flag_ to the existing state.
handler_t m_fd
File descriptor.
void clear(iostate state_=Socket::goodbit)
Clear the socket state. Closed socket remains in bad state.
@ failbit
indicates that an input operation failed to read the expected characters, or that an output operation...
bool open(const int domain_)
Create socket.
bool bind(const Address &my_address_)
Server in UDP client-server scenario has to bind socket to its local well-known port.
bool close()
Close socket connection.