12 #ifndef CONUDP_SOCKET_H
13 #define CONUDP_SOCKET_H
28 char self[] =
"ConUDPSocket::ConUDPSocket";
trace(
self);
33 char self[] =
"ConUDPSocket::~ConUDPSocket";
trace(
self);
54 int read (
char* buf_,
const unsigned int size_);
61 int write (
const char* buf_ = NULL,
const unsigned int size_ = 0);
#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...
bool connect(const Address &peer_addr_)
Connect socket to the peer.
ConUDPSocket()
Constructor.
void unconnect()
Unconnect connected socket.
virtual ~ConUDPSocket()
Destructor.
int write(const char *buf_=NULL, const unsigned int size_=0)
Perform blocking write by writing packet of specified size.
virtual int in_avail() const
This function returns the number of characters immediately available in the get area of the underly...
int read(char *buf_, const unsigned int size_)
Read specified number of bytes off the socket.