Classes | |
class | addr |
Abstract base class for network addresses. More... | |
class | addr_in |
Derived class for handling IPv4 addesses (including the port number). More... | |
class | sock |
The socklibpp::sock class represents a socket. All common socket routines are wrapped as member functions. More... | |
class | basic_sockbuf |
basic_sockbuf template More... | |
class | listener |
This class is an efficient way for testing many sockets for readability/writeability. More... | |
class | basic_sockstream |
Input/Output stream class. More... | |
Typedefs | |
typedef basic_sockbuf< char > | sockbuf |
The default basic_sockbuf instantiation. | |
typedef int | socket_type |
A typedef for an appropriate integral type to represent a socket. | |
typedef basic_sockstream< char > | sockstream |
Functions | |
ostream & | operator<< (std::ostream &, const addr_in &) |
Operator for printing an address in a stream. | |
std::istream & | operator>> (std::istream &, addr_in &) |
Operator for reading an address from a stream. | |
std::ostream & | crlf (std::ostream &o_) |
Manipulator for sending a CRLF. | |
std::ostream & | lfcr (std::ostream &o_) |
Manipulator for sending a LFCR. |
This namespace is used to avoid name clashes. In your programs you'll probably find more pratical to use something like:
namespace socklibpp = sock;
typedef basic_sockstream<char> socklibpp::sockstream |
The default sockstream type
This is probably the only typedef that makes sense for basic_sockstream. Be careful if you use basic_sockstream with another parameter (ike wchar_t).
std::ostream& socklibpp::crlf | ( | std::ostream & | o_ | ) |
Manipulator for sending a CRLF.
Sends a Carriage Return and a Line Feed (0x0D, 0x0A) to the ostream, then flushes it.
std::ostream& socklibpp::lfcr | ( | std::ostream & | o_ | ) |
Manipulator for sending a LFCR.
Sends a Line Feed and a Carriage Return (0x0A, 0x0D) to the ostream, then flushes it.
std::ostream & socklibpp::operator<< | ( | std::ostream & | os, | |
const addr_in & | si | |||
) |
Operator for printing an address in a stream.
Converts a addr_in object in a string representation, in the form: X.Y.Z.W:P
std::istream & socklibpp::operator>> | ( | std::istream & | is, | |
addr_in & | sai | |||
) |
Operator for reading an address from a stream.
Reads a addr_in object from a string representation, in the form: X.Y.Z.W:P