MOTION
0.01
Framework for mixed-protocol multi-party computation
|
Go to the documentation of this file.
27 #include <string_view>
36 struct TcpTransportImplementation;
42 TcpTransport(std::unique_ptr<detail::TcpTransportImplementation> implementation);
48 void SendMessage(std::vector<std::uint8_t>&& message)
override;
49 void SendMessage(
const std::vector<std::uint8_t>& message)
override;
52 std::optional<std::vector<std::uint8_t>>
ReceiveMessage()
override;
58 std::unique_ptr<detail::TcpTransportImplementation> implementation_;
84 std::size_t number_of_parties_;
86 std::unique_ptr<TcpSetupImplementation> implementation_;
std::string to_string(Provider p)
Definition: benchmark_providers.h:44
std::pair< std::string, std::uint16_t > TcpConnectionConfiguration
Definition: tcp_transport.h:61
void Shutdown() override
Definition: tcp_transport.cpp:80
std::size_t number_of_messages_sent
Definition: transport.h:33
bool Available() const override
Definition: tcp_transport.cpp:68
static void u32tou8(std::uint32_t v, std::uint8_t *result)
Definition: tcp_transport.cpp:89
TcpTransportImplementation(std::shared_ptr< boost::asio::io_context > io_context, tcp::socket &&socket)
Definition: tcp_transport.cpp:50
TcpTransport(std::unique_ptr< detail::TcpTransportImplementation > implementation)
Definition: tcp_transport.cpp:60
TcpSetupHelper(std::size_t my_id, const TcpPartiesConfiguration &parties_configuration)
Definition: tcp_transport.cpp:174
Definition: tcp_transport.cpp:159
Definition: transport.h:41
std::size_t number_of_messages_received
Definition: transport.h:34
boost::asio::ip::tcp::socket socket_
Definition: tcp_transport.cpp:54
std::shared_ptr< boost::asio::io_context > io_context_
Definition: tcp_transport.cpp:53
std::size_t number_of_parties_
Definition: tcp_transport.cpp:165
std::shared_mutex socket_mutex_
Definition: tcp_transport.cpp:55
Definition: tcp_transport.h:69
void SendMessage(std::vector< std::uint8_t > &&message) override
Definition: tcp_transport.cpp:87
static std::uint32_t u8tou32(std::array< std::uint8_t, sizeof(std::uint32_t)> &v)
Definition: tcp_transport.cpp:117
std::vector< TcpConnectionConfiguration > TcpPartiesConfiguration
Definition: tcp_transport.h:62
Definition: tcp_transport.h:40
Definition: tcp_transport.cpp:49
std::size_t number_of_bytes_received
Definition: transport.h:36
std::map< std::size_t, tcp::socket > sockets_
Definition: tcp_transport.cpp:171
std::uint16_t bind_port_
Definition: tcp_transport.cpp:169
std::size_t my_id_
Definition: tcp_transport.cpp:164
void ShutdownSend() override
Definition: tcp_transport.cpp:74
std::optional< std::vector< std::uint8_t > > ReceiveMessage() override
Definition: tcp_transport.cpp:125
boost::asio::ip::address bind_address_
Definition: tcp_transport.cpp:168
TransportStatistics statistics_
Definition: transport.h:70
std::shared_ptr< boost::asio::io_context > io_context_
Definition: tcp_transport.cpp:170
std::size_t number_of_bytes_sent
Definition: transport.h:35
std::vector< std::unique_ptr< Transport > > SetupConnections()
Definition: tcp_transport.cpp:203