CS104_ConnectionHandler

Type Alias CS104_ConnectionHandler 

Source
pub type CS104_ConnectionHandler = Option<unsafe extern "C" fn(parameter: *mut c_void, connection: CS104_Connection, event: CS104_ConnectionEvent)>;
Expand description

Handler that is called when the connection is established or closed

Note: Calling CS104_Connection_destroy or CS104_Connection_close inside of the callback causes a memory leak!

§Arguments

  • parameter - user provided parameter
  • connection - the connection object
  • event - event type

Aliased Type§

pub enum CS104_ConnectionHandler {
    None,
    Some(unsafe extern "C" fn(*mut c_void, *mut sCS104_Connection, u32)),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*mut c_void, *mut sCS104_Connection, u32))

Some value of type T.