pub unsafe extern "C" fn ble_l2cap_create_server(
psm: u16,
mtu: u16,
cb: ble_l2cap_event_fn,
cb_arg: *mut c_void,
) -> c_int
Expand description
@brief Create an L2CAP server.
This function creates an L2CAP server with the specified Protocol/Service Multiplexer (PSM) and Maximum Transmission Unit (MTU) size. The server is used to accept incoming L2CAP connections from remote clients. When a connection request is received, the provided callback function will be invoked with the corresponding event information.
@param psm The Protocol/Service Multiplexer (PSM) for the server. @param mtu The Maximum Transmission Unit (MTU) size for the server. @param cb Pointer to the callback function to be invoked when a connection request is received. @param cb_arg An optional argument to be passed to the callback function.
@return 0 on success; A non-zero value on failure.