Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cargo::ipc::Acceptor Class Reference

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
 
Acceptoroperator= (const Acceptor &)=delete
 

Private Member Functions

void handleConnection ()
 Handle one incoming connection. More...
 

Private Attributes

epoll::EventPollmEventPoll
 
NewConnectionCallback mNewConnectionCallback
 
Socket mSocket
 

Detailed Description

Accepts new connections and passes the new socket to a callback.

Member Typedef Documentation

typedef std::function<void(std::shared_ptr<Socket>& socketPtr)> cargo::ipc::Acceptor::NewConnectionCallback

Constructor & Destructor Documentation

cargo::ipc::Acceptor::Acceptor ( epoll::EventPoll eventPoll,
const std::string &  socketPath,
const NewConnectionCallback newConnectionCallback 
)

Class for accepting new connections.

Parameters
eventPolldispatcher
socketPathpath to the socket
newConnectionCallbackcalled on new connections
cargo::ipc::Acceptor::~Acceptor ( )
cargo::ipc::Acceptor::Acceptor ( const Acceptor acceptor)
delete

Member Function Documentation

void cargo::ipc::Acceptor::handleConnection ( )
private

Handle one incoming connection.

Used with external polling

Acceptor& cargo::ipc::Acceptor::operator= ( const Acceptor )
delete

Member Data Documentation

epoll::EventPoll& cargo::ipc::Acceptor::mEventPoll
private
NewConnectionCallback cargo::ipc::Acceptor::mNewConnectionCallback
private
Socket cargo::ipc::Acceptor::mSocket
private

The documentation for this class was generated from the following files: