|
xapian-core
2.0.0
|
Generic TCP/IP socket based server base class. More...
#include <config.h>#include "tcpserver.h"#include <xapian/error.h>#include "resolver.h"#include "socket_utils.h"#include "safefcntl.h"#include "safenetdb.h"#include "safesysexits.h"#include "safesysselect.h"#include "safesyssocket.h"#include "safeunistd.h"#include <netinet/in.h>#include <netinet/tcp.h>#include <signal.h>#include <sys/wait.h>#include <iostream>#include <limits>#include <cerrno>#include <cstring>#include <cstdlib>#include <sys/types.h>
Include dependency graph for tcpserver.cc:Go to the source code of this file.
Macros | |
| #define | LISTEN_BACKLOG 5 |
Functions | |
| static int | create_listener (const std::string &host, int port, bool tcp_nodelay) |
| Create a listening socket ready to accept connections. More... | |
Generic TCP/IP socket based server base class.
Definition in file tcpserver.cc.
| #define LISTEN_BACKLOG 5 |
Definition at line 61 of file tcpserver.cc.
|
static |
Create a listening socket ready to accept connections.
| host | hostname or address to listen on or an empty string to accept connections on any interface. |
| port | TCP port to listen on. |
| tcp_nodelay | If true, enable TCP_NODELAY option. |
Definition at line 71 of file tcpserver.cc.
References CLOSESOCKET, EX_NOPERM, EX_UNAVAILABLE, LISTEN_BACKLOG, SOCK_CLOEXEC, and socket_errno().