pub fn send(options: &SendOptions, tether_agent: &mut TetherAgent) -> Result<()>Examples found in repository?
examples/api.rs (line 51)
31fn demo_send() {
32 let mut tether_agent = TetherAgentBuilder::new("demoSend")
33 .build()
34 .expect("failed to init/connect Tether Agent");
35
36 let mut count = 0;
37
38 let options = SendOptions {
39 channel_name: Some("dummyData".into()),
40 channel_topic: None,
41 channel_id: None,
42 channel_role: None,
43 message_payload_json: None,
44 use_dummy_data: true,
45 };
46
47 loop {
48 std::thread::sleep(std::time::Duration::from_secs(1));
49 count += 1;
50 println!("SEND: sending message #{}", count);
51 send(&options, &mut tether_agent).expect("failed to send");
52 }
53}