MCPcopy Create free account
hub / github.com/corosync/corosync / join

Function join

bindings/rust/src/cpg.rs:401–411  ·  view source on GitHub ↗

Joins a CPG group for sending and receiving messages

(handle: &Handle, group: &str)

Source from the content-addressed store, hash-verified

399
400/// Joins a CPG group for sending and receiving messages
401pub fn join(handle: &Handle, group: &str) -> Result<()> {
402 let res = unsafe {
403 let c_group = string_to_cpg_name(group)?;
404 ffi::cpg_join(handle.cpg_handle, &c_group)
405 };
406 if res == ffi::CS_OK {
407 Ok(())
408 } else {
409 Err(CsError::from_c(res))
410 }
411}
412
413/// Leave the currently joined CPG group, another group can now be joined on
414/// the same [Handle] or [finalize] can be called to finish using CPG

Callers 1

mainFunction · 0.85

Calls 2

string_to_cpg_nameFunction · 0.85
cpg_joinFunction · 0.85

Tested by 1

mainFunction · 0.68