Struct ipcon_sys::ipcon_msg::IpconKevent
source · #[repr(C)]pub struct IpconKevent {
pub ke_type: IpconKeventType,
pub u: IpconKeventUnion,
}Expand description
IpconKevent is a group message delivered from the IPCON_KERNEL_GROUP_NAME group of IPCON kernel module peer named IPCON_KERNEL_NAME. It deliveries the following messages to peer:
- Peer added
- Peer exited
- Group of a peer added
- Group of a peer removed
Fields§
§ke_type: IpconKeventType§u: IpconKeventUnionImplementations§
source§impl IpconKevent
impl IpconKevent
sourcepub fn get_string(&self) -> Result<String, IpconError>
pub fn get_string(&self) -> Result<String, IpconError>
Get a string of the events like following:
"peer <peer name> added"
"peer <peer name> removed"
"group <group name>@<peer name> added"
"group <group name>@<peer name> removed"sourcepub fn peer_added(&self) -> Option<String>
pub fn peer_added(&self) -> Option<String>
Get the name of peer newly added. IPCON kernel module will not delivery this event of an anonymous peer.
sourcepub fn peer_removed(&self) -> Option<String>
pub fn peer_removed(&self) -> Option<String>
Get the name of peer removed. IPCON kernel module will not delivery this event of an anonymous peer.
sourcepub fn group_added(&self) -> Option<(String, String)>
pub fn group_added(&self) -> Option<(String, String)>
Get the newly added group information. The first element of the tuple stores the name of peer who owns the group, and the second element stores the group name.
sourcepub fn group_removed(&self) -> Option<(String, String)>
pub fn group_removed(&self) -> Option<(String, String)>
Get the newly removed group information. The first element of the tuple stores the name of peer who owns the group, and the second element stores the group name.
Trait Implementations§
source§impl Clone for IpconKevent
impl Clone for IpconKevent
source§fn clone(&self) -> IpconKevent
fn clone(&self) -> IpconKevent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more