BlueToe
an alternative GATT/BLE implementation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
bluetoe::server< Options >::connection_data Class Reference

per connection data More...

#include <bluetoe/server.hpp>

Inheritance diagram for bluetoe::server< Options >::connection_data:

Public Member Functions

std::uint16_t negotiated_mtu () const
 returns the negotiated MTU
 
void client_mtu (std::uint16_t mtu)
 sets the MTU size of the connected client.
 
std::uint16_t client_mtu () const
 returns the client MTU
 
std::uint16_t server_mtu () const
 returns the MTU of this server as provided in the c'tor
 

Detailed Description

template<typename ... Options>
class bluetoe::server< Options >::connection_data

per connection data

The underlying layer have to provide the memory for a connection and pass the connection_data to l2cap_input(). The purpose of this class is to store all connection related data that must be keept per connection and must be reset with a new connection.

Member Function Documentation

◆ client_mtu() [1/2]

template<typename ... Options>
std::uint16_t bluetoe::server< Options >::connection_data::client_mtu ( ) const
inline

returns the client MTU

By default this returns 23 unless the client MTU was changed by call to client_mtu( std::size_t )

◆ client_mtu() [2/2]

template<typename ... Options>
void bluetoe::server< Options >::connection_data::client_mtu ( std::uint16_t  mtu)
inline

sets the MTU size of the connected client.

The default is 23. Usually this function will be called by the server implementation as reaction of an "Exchange MTU Request".

Postcondition
client_mtu() == mtu

◆ server_mtu()

template<typename ... Options>
std::uint16_t bluetoe::server< Options >::connection_data::server_mtu ( ) const
inline

returns the MTU of this server as provided in the c'tor

Precondition
connection_data(X).server_mtu() == X

The documentation for this class was generated from the following file: