wibble::net::TCPServer Struct Referenceabstract

`#include <server.h>`

Inheritance diagram for wibble::net::TCPServer:
[legend]
Collaboration diagram for wibble::net::TCPServer:
[legend]

## Public Member Functions

| TCPServer ()
virtual | ~TCPServer ()
int | accept_loop ()
| Loop accepting connections on the socket, until interrupted by a signal in stop_signals. More...
virtual void | handle_client (int sock, const std::string &peer_hostname, const std::string &peer_hostaddr, const std::string &peer_port)=0
Public Member Functions inherited from wibble::net::Server
| Server ()
| ~Server ()
void | bind (const char *port, const char *host=NULL)
void | listen (int backlog=16)
void | set_sock_cloexec ()

## Public Attributes

std::vector< int > | stop_signals
Public Attributes inherited from wibble::net::Server
std::string | host
std::string | port
int | socktype
int | sock
struct sigaction * | old_signal_actions
struct sigaction * | signal_actions

## Protected Member Functions

void | signal_setup ()
void | signal_install ()
void | signal_uninstall ()

## Static Protected Member Functions

static void | signal_handler (int sig)

## Static Protected Attributes

static int | last_signal

## Constructor & Destructor Documentation

wibble::net::TCPServer::TCPServer | ( |  | ) |

virtual wibble::net::TCPServer::~TCPServer | ( |  | ) |

virtual

## Member Function Documentation

int wibble::net::TCPServer::accept_loop | ( |  | ) |

Loop accepting connections on the socket, until interrupted by a signal in stop_signals.

Returns
  the signal number that stopped the loop

virtual void wibble::net::TCPServer::handle_client | ( | int | sock,
|  | const std::string & | peer_hostname,
|  | const std::string & | peer_hostaddr,
|  | const std::string & | peer_port
| ) |  |

pure virtual

static void wibble::net::TCPServer::signal_handler | ( | int | sig | ) |

static protected

void wibble::net::TCPServer::signal_install | ( |  | ) |

protected

void wibble::net::TCPServer::signal_setup | ( |  | ) |

protected

void wibble::net::TCPServer::signal_uninstall | ( |  | ) |

protected

## Member Data Documentation

int wibble::net::TCPServer::last_signal

static protected

std::vector<int> wibble::net::TCPServer::stop_signals

The documentation for this struct was generated from the following file:

- server.h