#define trace_with_mask(s, m)
trace_with_mask() is used to trace function call chain in C++ program.
Abstraction of socket data type.
Socketbuf class is derived from Streambuf to provide I/O with the socket file descriptor.
A wrapper class to provide AutoPtr with reference semantics.
IPv4Socket * accept()
Accept connection on the listening socket.
int write(const char *buf_, const unsigned int size_)
Perform blocking write by writing packet of specified size.
IPv4Socket(const handler_t fd_)
Constructor from file descriptor.
IPv4Socket()
Default constructor.
IPv4Socket * clone() const
"Virtual constructor".
virtual Streambuf * rdbuf()
Return a pointer to the Socketbuf associated with the stream.
bool close()
Close socket connection.
bool connect(const Address &address_)
Client makes connection with the server at address_.
bool open(const int domain_)
Create socket.
Streambuf * m_rdbuf
Socketbuf.
virtual int in_avail() const
This function returns the number of characters immediately available in the get area of the underlyin...
virtual bool bind(const Address &my_address_)
Server binds listening socket to its local well-known port.
const int getDomain() const
Get socket domain type.
IPv4Socket(const IPv4Socket &)
int read(char *buf_, const unsigned int size_)
Read packet of specified size and save it to the given buffer.
handler_t getHandler() const
Get socket file descriptor.
char * m_path
Path of UNIX domain socket.
IPv4Socket & operator=(const IPv4Socket &)
~IPv4Socket()
Destructor will close connection.
static const int MAXTCPBUFSZ
Maximum TCP data frame (no options)
int m_type
Socket domain type.
handler_t m_fd
File descriptor.
int in_avail()
This function returns the number of characters immediately available in the get area.
@ SOCKTRACE
Extended Socket & friends messages