Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
bt_opp_server_transport Struct Reference

OPP Push Server transport registration structure. More...

#include <zephyr/bluetooth/classic/opp.h>

Data Fields

struct bt_goep_transport_rfcomm_server server
 Underlying GOEP RFCOMM server.
int(* accept )(struct bt_conn *conn, struct bt_opp_server_transport *transport_server, struct bt_opp_server **opp_server)
 Accept connection callback.

Detailed Description

OPP Push Server transport registration structure.

Used to register a Push Server that accepts incoming GOEP v1.1 (RFCOMM) transport connections.

Field Documentation

◆ accept

int(* bt_opp_server_transport::accept) (struct bt_conn *conn, struct bt_opp_server_transport *transport_server, struct bt_opp_server **opp_server)

Accept connection callback.

Called when a new transport connection arrives. The application must allocate and initialize a bt_opp_server instance and pass it back via opp_server. Call bt_opp_server_register on the instance before returning.

Note
Registering the instance is mandatory and checked by an assertion: rejecting the transport after allocating it would likely leak it. To refuse a connection, return a negative error code without allocating an instance.
An instance that served an earlier connection has to be released with bt_opp_server_unregister, or zeroed, before it is registered again, otherwise bt_opp_server_register reports -EALREADY.
Parameters
connACL connection object.
transport_serverThis transport registration structure.
opp_serverOutput pointer for the allocated server instance.
Return values
0on success.
-ENOMEMNo server instance is available.
-EACCESThe application refuses the connection.
-errnoAny other negative error code rejects the connection.

◆ server

struct bt_goep_transport_rfcomm_server bt_opp_server_transport::server

Underlying GOEP RFCOMM server.


The documentation for this struct was generated from the following file:
  • zephyr/bluetooth/classic/opp.h