MOTION  0.01
Framework for mixed-protocol multi-party computation
Classes | Public Types | Public Member Functions | List of all members
encrypto::motion::communication::CommunicationLayer Class Reference

#include <communication_layer.h>

Classes

struct  CommunicationLayerImplementation
 

Public Types

using MessageHandlerFunction = std::function< std::shared_ptr< MessageHandler >(std::size_t party_id)>
 

Public Member Functions

 CommunicationLayer (std::size_t my_id, std::vector< std::unique_ptr< Transport >> &&transports)
 
 CommunicationLayer (std::size_t my_id, std::vector< std::unique_ptr< Transport >> &&transports, std::shared_ptr< Logger > logger)
 
 ~CommunicationLayer ()
 
std::size_t GetNumberOfParties () const
 
std::size_t GetMyId () const
 
void Start ()
 
void Synchronize ()
 
void SendMessage (std::size_t party_id, std::vector< std::uint8_t > &&message)
 
void SendMessage (std::size_t party_id, const std::vector< std::uint8_t > &message)
 
void SendMessage (std::size_t party_id, std::shared_ptr< const std::vector< std::uint8_t >> message)
 
void SendMessage (std::size_t party_id, flatbuffers::FlatBufferBuilder &&message_builder)
 
void BroadcastMessage (std::vector< std::uint8_t > &&message)
 
void BroadcastMessage (const std::vector< std::uint8_t > &message)
 
void BroadcastMessage (std::shared_ptr< const std::vector< std::uint8_t >> message)
 
void BroadcastMessage (flatbuffers::FlatBufferBuilder &&message_builder)
 
void RegisterMessageHandler (MessageHandlerFunction, const std::vector< MessageType > &message_types)
 
void DeregisterMessageHandler (const std::vector< MessageType > &message_types)
 
MessageHandlerGetMessageHandler (std::size_t party_id, MessageType type)
 
void RegisterFallbackMessageHandler (MessageHandlerFunction)
 
MessageHandlerGetFallbackMessageHandler (std::size_t party_id)
 
void Shutdown ()
 
std::vector< TransportStatisticsGetTransportStatistics () const noexcept
 
void SetLogger (std::shared_ptr< Logger > logger)
 

Member Typedef Documentation

◆ MessageHandlerFunction

using encrypto::motion::communication::CommunicationLayer::MessageHandlerFunction = std::function<std::shared_ptr<MessageHandler>(std::size_t party_id)>

Constructor & Destructor Documentation

◆ CommunicationLayer() [1/2]

encrypto::motion::communication::CommunicationLayer::CommunicationLayer ( std::size_t  my_id,
std::vector< std::unique_ptr< Transport >> &&  transports 
)

◆ CommunicationLayer() [2/2]

encrypto::motion::communication::CommunicationLayer::CommunicationLayer ( 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:

◆ ~CommunicationLayer()

encrypto::motion::communication::CommunicationLayer::~CommunicationLayer ( )
Here is the call graph for this function:

Member Function Documentation

◆ BroadcastMessage() [1/4]

void encrypto::motion::communication::CommunicationLayer::BroadcastMessage ( const std::vector< std::uint8_t > &  message)

◆ BroadcastMessage() [2/4]

void encrypto::motion::communication::CommunicationLayer::BroadcastMessage ( flatbuffers::FlatBufferBuilder &&  message_builder)
Here is the call graph for this function:

◆ BroadcastMessage() [3/4]

void encrypto::motion::communication::CommunicationLayer::BroadcastMessage ( std::shared_ptr< const std::vector< std::uint8_t >>  message)

◆ BroadcastMessage() [4/4]

void encrypto::motion::communication::CommunicationLayer::BroadcastMessage ( std::vector< std::uint8_t > &&  message)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DeregisterMessageHandler()

void encrypto::motion::communication::CommunicationLayer::DeregisterMessageHandler ( const std::vector< MessageType > &  message_types)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFallbackMessageHandler()

MessageHandler & encrypto::motion::communication::CommunicationLayer::GetFallbackMessageHandler ( std::size_t  party_id)

◆ GetMessageHandler()

MessageHandler & encrypto::motion::communication::CommunicationLayer::GetMessageHandler ( std::size_t  party_id,
MessageType  type 
)

◆ GetMyId()

std::size_t encrypto::motion::communication::CommunicationLayer::GetMyId ( ) const
inline
Here is the caller graph for this function:

◆ GetNumberOfParties()

std::size_t encrypto::motion::communication::CommunicationLayer::GetNumberOfParties ( ) const
inline
Here is the caller graph for this function:

◆ GetTransportStatistics()

std::vector< TransportStatistics > encrypto::motion::communication::CommunicationLayer::GetTransportStatistics ( ) const
noexcept

◆ RegisterFallbackMessageHandler()

void encrypto::motion::communication::CommunicationLayer::RegisterFallbackMessageHandler ( MessageHandlerFunction  handler_factory)

◆ RegisterMessageHandler()

void encrypto::motion::communication::CommunicationLayer::RegisterMessageHandler ( MessageHandlerFunction  handler_factory,
const std::vector< MessageType > &  message_types 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SendMessage() [1/4]

void encrypto::motion::communication::CommunicationLayer::SendMessage ( std::size_t  party_id,
const std::vector< std::uint8_t > &  message 
)

◆ SendMessage() [2/4]

void encrypto::motion::communication::CommunicationLayer::SendMessage ( std::size_t  party_id,
flatbuffers::FlatBufferBuilder &&  message_builder 
)
Here is the call graph for this function:

◆ SendMessage() [3/4]

void encrypto::motion::communication::CommunicationLayer::SendMessage ( std::size_t  party_id,
std::shared_ptr< const std::vector< std::uint8_t >>  message 
)

◆ SendMessage() [4/4]

void encrypto::motion::communication::CommunicationLayer::SendMessage ( std::size_t  party_id,
std::vector< std::uint8_t > &&  message 
)
Here is the caller graph for this function:

◆ SetLogger()

void encrypto::motion::communication::CommunicationLayer::SetLogger ( std::shared_ptr< Logger logger)

◆ Shutdown()

void encrypto::motion::communication::CommunicationLayer::Shutdown ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Start()

void encrypto::motion::communication::CommunicationLayer::Start ( )
Here is the call graph for this function:

◆ Synchronize()

void encrypto::motion::communication::CommunicationLayer::Synchronize ( )
Here is the call graph for this function:
Here is the caller graph for this function:

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