25 uint16_t
port,
const std::string &ip =
"127.0.0.1");
49 void tlsSetKey(
unsigned int i) {
52 unsigned int tlsKey()
const {
56 unsigned int tlsKeyIndex = 0;
std::string label() const
Return the object's log label.
Definition: logger.h:251
Listen on a single socket for incoming connections.
Definition: serversocket.h:15
std::string cacheLabel() override
Server sockets shall not be cached.
Definition: serversocket.h:36
ServerSocket(int fd, const std::string &label, Task *owner)
Create a new server to listen on an existing file descriptor.
Definition: serversocket.h:29
virtual SocketConnection * incoming()
Return Connection object if new client available, else return nullptr.
Definition: serversocket.cpp:27
void stopListening()
Schedule listen socket for removal.
Definition: serversocket.h:41
ServerSocket(const std::string &label, Task *task, uint16_t port, const std::string &ip="127.0.0.1")
Create a new server socket.
Definition: serversocket.cpp:19
This class implements low-level socket connection operations. Inherit from it to implement protocols ...
Definition: socketconnection.h:47
This is a slave to the Engine class. You can't use it directly, only through its subclasses,...
Definition: socket.h:18
Task * owner() const
Return task owning the socket.
Definition: socket.h:27
uint16_t port() const
Return port number to which the socket is supposed to connect.
Definition: socket.h:37
void closeMe()
Tell the network engine that the connection should be closed.
Definition: socket.h:178
The purpose of a task is to manage socket connections, and/or to execute timers.
Definition: task.h:39