Accepts new connections and passes the new socket to a callback. More...
#include <acceptor.hpp>
Public Types | |
typedef std::function< void(std::shared_ptr < Socket > &socketPtr)> | NewConnectionCallback |
Public Member Functions | |
Acceptor (epoll::EventPoll &eventPoll, const std::string &socketPath, const NewConnectionCallback &newConnectionCallback) | |
Class for accepting new connections. More... | |
~Acceptor () | |
Acceptor (const Acceptor &acceptor)=delete | |
Acceptor & | operator= (const Acceptor &)=delete |
Private Member Functions | |
void | handleConnection () |
Handle one incoming connection. More... | |
Private Attributes | |
epoll::EventPoll & | mEventPoll |
NewConnectionCallback | mNewConnectionCallback |
Socket | mSocket |
Accepts new connections and passes the new socket to a callback.
typedef std::function<void(std::shared_ptr<Socket>& socketPtr)> cargo::ipc::Acceptor::NewConnectionCallback |
cargo::ipc::Acceptor::Acceptor | ( | epoll::EventPoll & | eventPoll, |
const std::string & | socketPath, | ||
const NewConnectionCallback & | newConnectionCallback | ||
) |
Class for accepting new connections.
eventPoll | dispatcher |
socketPath | path to the socket |
newConnectionCallback | called on new connections |
cargo::ipc::Acceptor::~Acceptor | ( | ) |
|
delete |
|
private |
Handle one incoming connection.
Used with external polling
|
private |
|
private |
|
private |