25 #ifndef CARGO_IPC_INTERNALS_ACCEPTOR_HPP
26 #define CARGO_IPC_INTERNALS_ACCEPTOR_HPP
55 const std::string& socketPath,
77 #endif // CARGO_IPC_INTERNALS_ACCEPTOR_HPP
This class wraps all operations possible to do with a socket.
Definition: socket.hpp:40
std::function< void(std::shared_ptr< Socket > &socketPtr)> NewConnectionCallback
Definition: acceptor.hpp:45
Acceptor(epoll::EventPoll &eventPoll, const std::string &socketPath, const NewConnectionCallback &newConnectionCallback)
Class for accepting new connections.
Definition: acceptor.cpp:35
epoll::EventPoll & mEventPoll
Definition: acceptor.hpp:63
Configuration file for the code.
Acceptor & operator=(const Acceptor &)=delete
void handleConnection()
Handle one incoming connection.
Definition: acceptor.cpp:52
NewConnectionCallback mNewConnectionCallback
Definition: acceptor.hpp:64
~Acceptor()
Definition: acceptor.cpp:46
This class waits on registered file descriptor for events.
Definition: event-poll.hpp:47
Accepts new connections and passes the new socket to a callback.
Definition: acceptor.hpp:42
Socket mSocket
Definition: acceptor.hpp:65