MOTION  0.01
Framework for mixed-protocol multi-party computation
Public Types | Public Member Functions | Public Attributes | List of all members
encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation Struct Reference
Collaboration diagram for encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation:
Collaboration graph
[legend]

Public Types

using message_t = std::variant< std::vector< std::uint8_t >, std::shared_ptr< const std::vector< std::uint8_t > >>
 
using MessageHandlerMap = std::unordered_map< MessageType, std::shared_ptr< MessageHandler > >
 

Public Member Functions

 CommunicationLayerImplementation (std::size_t my_id, std::vector< std::unique_ptr< Transport >> &&transports, std::shared_ptr< Logger > logger)
 
void ReceiveTask (std::size_t party_id)
 
void SendTask (std::size_t party_id)
 
void initialize (std::size_t my_id, std::size_t number_of_parties)
 
void SendTerminationMessages ()
 
void Shutdown ()
 

Public Attributes

std::size_t my_id_
 
std::size_t number_of_parties_
 
std::promise< void > start_promise_
 
std::shared_future< void > start_sfuture_
 
std::atomic< bool > continue_communication_ = true
 
std::vector< std::unique_ptr< Transport > > transports_
 
std::vector< SynchronizedFiberQueue< message_t > > send_queues_
 
std::vector< std::thread > receive_threads_
 
std::vector< std::thread > send_threads_
 
std::shared_mutex message_handlers_mutex_
 
std::vector< MessageHandlerMapmessage_handlers_
 
std::vector< std::shared_ptr< MessageHandler > > fallback_message_handlers_
 
std::shared_ptr< SynchronizationHandlersync_handler_
 
std::shared_ptr< Loggerlogger_
 

Member Typedef Documentation

◆ message_t

using encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::message_t = std::variant<std::vector<std::uint8_t>, std::shared_ptr<const std::vector<std::uint8_t> >>

◆ MessageHandlerMap

Constructor & Destructor Documentation

◆ CommunicationLayerImplementation()

encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::CommunicationLayerImplementation ( std::size_t  my_id,
std::vector< std::unique_ptr< Transport >> &&  transports,
std::shared_ptr< Logger logger 
)
Here is the call graph for this function:

Member Function Documentation

◆ initialize()

void encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::initialize ( std::size_t  my_id,
std::size_t  number_of_parties 
)

◆ ReceiveTask()

void encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::ReceiveTask ( std::size_t  party_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SendTask()

void encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::SendTask ( std::size_t  party_id)
Here is the caller graph for this function:

◆ SendTerminationMessages()

void encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::SendTerminationMessages ( )

◆ Shutdown()

void encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::Shutdown ( )

Member Data Documentation

◆ continue_communication_

std::atomic<bool> encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::continue_communication_ = true

◆ fallback_message_handlers_

std::vector<std::shared_ptr<MessageHandler> > encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::fallback_message_handlers_

◆ logger_

std::shared_ptr<Logger> encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::logger_

◆ message_handlers_

std::vector<MessageHandlerMap> encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::message_handlers_

◆ message_handlers_mutex_

std::shared_mutex encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::message_handlers_mutex_

◆ my_id_

std::size_t encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::my_id_

◆ number_of_parties_

std::size_t encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::number_of_parties_

◆ receive_threads_

std::vector<std::thread> encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::receive_threads_

◆ send_queues_

std::vector<SynchronizedFiberQueue<message_t> > encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::send_queues_

◆ send_threads_

std::vector<std::thread> encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::send_threads_

◆ start_promise_

std::promise<void> encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::start_promise_

◆ start_sfuture_

std::shared_future<void> encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::start_sfuture_

◆ sync_handler_

std::shared_ptr<SynchronizationHandler> encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::sync_handler_

◆ transports_

std::vector<std::unique_ptr<Transport> > encrypto::motion::communication::CommunicationLayer::CommunicationLayerImplementation::transports_

The documentation for this struct was generated from the following file: