Struct mpc_bench::Party [−][src]
pub struct Party { /* fields omitted */ }
Expand description
A Party
that takes part in a protocol. The party has a unique id
and is pre-loaded with
communication channels to and from all the other parties. A party keeps track of its own stats.
Implementations
Sets an actual name for a party to make the stats easier to interpret.
Creates a timer with the given name
that starts running immediately.
Stops the timer
and writes it measured duration to this party’s statistics.
Blocks until this party receives a message from the party with from_id
. A message is a
vector of bytes Vec<u8>
. This can be achieved for example using bincode
serialization.
Sends a vector of bytes to the party with to_id
and keeps track of the number of bits sent
to this party.
Broadcasts a message (a vector of bytes) to all parties and keeps track of the number of bits sent.
Gets the collected statistics for this party.