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

Callbacks base class for the L2CAP channel. More...

#include <NimBLEL2CAPChannel.h>

Public Member Functions

virtual bool shouldAcceptConnection (NimBLEL2CAPChannel *channel)
 
virtual void onConnect (NimBLEL2CAPChannel *channel, uint16_t negotiatedMTU)
 
virtual void onRead (NimBLEL2CAPChannel *channel, std::vector< uint8_t > &data)
 
virtual void onDisconnect (NimBLEL2CAPChannel *channel)
 

Detailed Description

Callbacks base class for the L2CAP channel.

Member Function Documentation

◆ onConnect()

virtual void NimBLEL2CAPChannelCallbacks::onConnect ( NimBLEL2CAPChannel channel,
uint16_t  negotiatedMTU 
)
inlinevirtual

Called after a connection has been made. Default implementation does nothing.

◆ onDisconnect()

virtual void NimBLEL2CAPChannelCallbacks::onDisconnect ( NimBLEL2CAPChannel channel)
inlinevirtual

Called after the channel has been disconnected. Default implementation does nothing.

◆ onRead()

virtual void NimBLEL2CAPChannelCallbacks::onRead ( NimBLEL2CAPChannel channel,
std::vector< uint8_t > &  data 
)
inlinevirtual

Called when data has been read from the channel. Default implementation does nothing.

◆ shouldAcceptConnection()

virtual bool NimBLEL2CAPChannelCallbacks::shouldAcceptConnection ( NimBLEL2CAPChannel channel)
inlinevirtual

Called when the client attempts to open a channel on the server. You can choose to accept or deny the connection. Default implementation returns true.