Macro mpstthree::send_mpst[][src]

macro_rules! send_mpst {
    ($session : expr, $payload : expr, $receiver : ident, $sender : ident,
 $meshedchannels_name : ident, $nsessions : literal, $exclusion : literal) => { ... };
}
Expand description

SEND Shorter way to call the code within the send function instead of having to create the function itself.

Arguments

  • The session that will be used
  • The payload that will be send
  • The name of the receiver
  • The name of the MeshedChannels type that will be used
  • The number of participants (all together)
  • The index of the binary session type that will receive in the MeshedChannels for this specific role. Index starts at 1.

Example

use mpstthree::{create_multiple_normal_role, create_meshedchannels, send_mpst};

create_meshedchannels!(MeshedChannelsThree, 3);

create_multiple_normal_role!(
    RoleA, RoleADual |
    RoleB, RoleBDual |
    RoleD, RoleDDual |
);

fn main(s: Endpoint) {
   let _s = send_mpst!(s, (), RoleB, RoleA, MeshedChannelsThree, 3, 1);
}