Struct rubble::l2cap::ChannelData [−][src]
Expand description
Data associated with a connected L2CAP channel.
Fields
response_channel: Channel
Channel to which responses should be addressed.
For fixed, predefined channels, this is always the same value for both devices, but dynamically allocated channels can have different CIDs on both devices.
protocol: &'a mut P
The protocol listening on this channel.
pdu: u8
Outgoing PDU size of the protocol.
This is the number of bytes that must be available to the protocol in the TX buffer to guarantee that all of the protocol’s PDUs will fit.
Implementations
Returns the Channel
to which the response should be sent.
Returns the PDU size required by the protocol.
This is the minimum size in Bytes the protocol needs to have provided for any of its
outgoing PDUs. Protocol
implementations may make use of additional space as well, but this
is the very minimum.
The L2CAP implementation will not forward incoming PDUs to the protocol unless this amount of space is available in the TX buffer. This guarantees that the response will always fit.
Consumes self
and returns the protocol connected to the channel, with lifetime 'a
.
This can be useful when the lifetime of the reference must not be tied to self
, as would
be the case with protocol()
.