esp-nimble-cpp 2.3.0
Loading...
Searching...
No Matches
NimBLEL2CAPServer Class Reference

L2CAP server class. More...

#include <NimBLEL2CAPServer.h>

Public Member Functions

NimBLEL2CAPChannelcreateService (const uint16_t psm, const uint16_t mtu, NimBLEL2CAPChannelCallbacks *callbacks)
 Register a new L2CAP service instance.
 

Detailed Description

L2CAP server class.

Encapsulates a L2CAP server that can hold multiple services. Every service is represented by a channel object and an assorted set of callbacks.

Member Function Documentation

◆ createService()

NimBLEL2CAPChannel * NimBLEL2CAPServer::createService ( const uint16_t  psm,
const uint16_t  mtu,
NimBLEL2CAPChannelCallbacks callbacks 
)

Register a new L2CAP service instance.

Parameters
psmThe port multiplexor service number.
mtuThe maximum transmission unit.
callbacksThe callbacks for this service.
Returns
the newly created object, if the server registration was successful.