Shared base classes for tcpclient.h and tcpserver.h. More...
#include <iostream>
#include <deque>
#include <map>
#include <vector>
#include <thread>
#include <mutex>
#include <arpa/inet.h>
#include <sys/epoll.h>
#include "tcpssl.h"
Go to the source code of this file.
Classes | |
class | tcp::EPoll |
Encapsulates the EPoll interface. More... | |
class | tcp::Socket |
Encapsulates a socket handle that is capable of recieving epoll events. More... | |
class | tcp::DataSocket |
Represents a buffered socket that can send and receive data using optional SSL encryption. More... | |
Namespaces | |
tcp | |
A tcp client/server library for linux that supports openSSL and EPoll. | |
Enumerations | |
enum | tcp::SocketState { UNCONNECTED =0, LISTENING, CONNECTING, CONNECTED, DISCONNECTED } |
Determines the state of a socket. More... | |
Functions | |
void | tcp::setLogStream (ostream *os) |
Set the output stream used by the library for log, warning and error messages. More... | |
void | tcp::error (string msg) |
Send an error message to the log stream. | |
void | tcp::error (string label, string msg) |
Send a labelled error message to the log stream. | |
void | tcp::warning (string msg) |
Send a warning message to the log stream. | |
void | tcp::warning (string label, string msg) |
Send an labelled warning message to the log stream. | |
void | tcp::log (string msg) |
Send an log message to the log stream. | |
void | tcp::log (string label, string msg) |
Send a labelled log message to the log stream. | |
int | tcp::getDomainFromHostAndPort (const char *host, const char *port, int def_domain=AF_INET) |
Tries to determine which address family to use from a host and port string. More... | |
Shared base classes for tcpclient.h and tcpserver.h.
Provides Linux epoll event management, openSSL interface, and socket I/O buffering
epoll.poll(100)
regularly in their code for network events to function correctly. Definition in file tcpsocket.h.