A socket that accepts incoming stream connections (e.g.
More...
#include <ServerSocket.hxx>
A socket that accepts incoming stream connections (e.g.
TCP).
Definition at line 34 of file ServerSocket.hxx.
| ServerSocket::ServerSocket |
( |
EventLoop & |
_loop | ) |
|
| ServerSocket::~ServerSocket |
( |
| ) |
|
| void ServerSocket::AddFD |
( |
int |
fd | ) |
|
Add a socket descriptor that is accepting connections.
After this has been called, don't call server_socket_open(), because the socket is already open.
Throws #std::runtime_error on error.
| void ServerSocket::AddHost |
( |
const char * |
hostname, |
|
|
unsigned |
port |
|
) |
| |
Resolves a host name, and adds listeners on all addresses in the result set.
Throws #std::runtime_error on error.
- Parameters
-
| hostname | the host name to be resolved |
| port | the TCP port |
| error | location to store the error occurring |
Add a listener on a Unix domain socket.
Throws #std::runtime_error on error.
- Parameters
-
| path | the absolute socket path |
| error | location to store the error occurring |
| void ServerSocket::AddPort |
( |
unsigned |
port | ) |
|
Add a listener on a port on all interfaces.
Throws #std::runtime_error on error.
- Parameters
-
| port | the TCP port |
| error | location to store the error occurring |
| void ServerSocket::Close |
( |
| ) |
|
| virtual void ServerSocket::OnAccept |
( |
int |
fd, |
|
|
SocketAddress |
address, |
|
|
int |
uid |
|
) |
| |
|
protectedpure virtual |
| void ServerSocket::Open |
( |
| ) |
|
Throws #std::runtime_error on error.
| friend class OneServerSocket |
|
friend |
The documentation for this class was generated from the following file: