CS104_Slave_setConnectionRequestHandler

Function CS104_Slave_setConnectionRequestHandler 

Source
pub unsafe extern "C" fn CS104_Slave_setConnectionRequestHandler(
    self_: CS104_Slave,
    handler: CS104_ConnectionRequestHandler,
    parameter: *mut c_void,
)
Expand description

Set the connection request handler

The connection request handler is called whenever a client/master is trying to connect. This handler can be used to implement access control mechanisms as it allows the user to decide if the new connection is accepted or not.

ยงArguments

  • self - the slave instance
  • handler - the callback function to be used
  • parameter - user provided context parameter that will be passed to the callback function (or NULL if not required).