Interprocess connection server — listens for multiple client connections.
More...
#include <interprocess_connection.hpp>
Interprocess connection server — listens for multiple client connections.
Each accepted connection gets its own InterprocessConnection.
◆ InterprocessConnectionServer() [1/2]
| pulp::events::InterprocessConnectionServer::InterprocessConnectionServer |
( |
| ) |
|
◆ ~InterprocessConnectionServer()
| virtual pulp::events::InterprocessConnectionServer::~InterprocessConnectionServer |
( |
| ) |
|
|
virtual |
◆ InterprocessConnectionServer() [2/2]
| pulp::events::InterprocessConnectionServer::InterprocessConnectionServer |
( |
const InterprocessConnectionServer & | | ) |
|
|
delete |
◆ bound_address()
| std::string pulp::events::InterprocessConnectionServer::bound_address |
( |
| ) |
const |
Actual bound IPv4 address after binding (e.g.
"127.0.0.1" or "0.0.0.0"). Returns empty for local, pipe, or unbound servers.
◆ bound_port()
| std::uint16_t pulp::events::InterprocessConnectionServer::bound_port |
( |
| ) |
const |
Actual TCP port after binding, including an OS-assigned port requested with host:0.
Returns zero for local, pipe, or unbound servers.
◆ client_connected()
| virtual void pulp::events::InterprocessConnectionServer::client_connected |
( |
std::unique_ptr< InterprocessConnection > | connection | ) |
|
|
virtual |
Called when a new client connects.
Override to handle. The returned connection is owned by the server.
◆ is_running()
| bool pulp::events::InterprocessConnectionServer::is_running |
( |
| ) |
const |
|
inline |
Whether the server is running.
◆ operator=()
◆ set_frame_read_timeout()
| void pulp::events::InterprocessConnectionServer::set_frame_read_timeout |
( |
std::chrono::milliseconds | timeout | ) |
|
◆ set_max_message_bytes()
| void pulp::events::InterprocessConnectionServer::set_max_message_bytes |
( |
std::size_t | bytes | ) |
|
Apply a framing ceiling to every subsequently accepted connection.
◆ set_write_timeout()
| void pulp::events::InterprocessConnectionServer::set_write_timeout |
( |
std::chrono::milliseconds | timeout | ) |
|
◆ start()
Start listening on the given name.
For sockets an omitted host ("9100") listens on 127.0.0.1 only; pass "0.0.0.0:9100" explicitly to accept connections from other hosts.
◆ stop()
| void pulp::events::InterprocessConnectionServer::stop |
( |
| ) |
|
Stop listening and disconnect all clients.
◆ on_client_connected
| std::function<void(std::unique_ptr<InterprocessConnection>)> pulp::events::InterprocessConnectionServer::on_client_connected |
Lambda callback alternative.
The documentation for this class was generated from the following file: