pub struct L2capChannelListener<'d, T: Controller, P: PacketPool> { /* private fields */ }Expand description
A listener for incoming L2CAP connection requests on a specific connection.
Created by L2capChannel::listen. When dropped, clears the listening flag
on the connection and rejects any pending connection requests that have not
yet been returned by next or accept.
Implementations§
Source§impl<'d, T: Controller, P: PacketPool> L2capChannelListener<'d, T, P>
impl<'d, T: Controller, P: PacketPool> L2capChannelListener<'d, T, P>
Sourcepub async fn next(&self) -> Result<L2capPendingConnection<'d, P>, Error>
pub async fn next(&self) -> Result<L2capPendingConnection<'d, P>, Error>
Wait for the next incoming L2CAP connection request.
Returns a L2capPendingConnection that can be inspected, then accepted or rejected.
Sourcepub async fn accept(
&self,
config: &L2capChannelConfig,
) -> Result<L2capChannel<'d, P>, BleHostError<T::Error>>
pub async fn accept( &self, config: &L2capChannelConfig, ) -> Result<L2capChannel<'d, P>, BleHostError<T::Error>>
Wait for the next incoming L2CAP connection request and accept it.
This is a convenience method equivalent to calling next followed by
L2capPendingConnection::accept.
Sourcepub fn connection(&self) -> &Connection<'d, P>
pub fn connection(&self) -> &Connection<'d, P>
Get a reference to the connection this listener is bound to.
Trait Implementations§
Source§impl<T: Controller, P: PacketPool> Drop for L2capChannelListener<'_, T, P>
impl<T: Controller, P: PacketPool> Drop for L2capChannelListener<'_, T, P>
Auto Trait Implementations§
impl<'d, T, P> Freeze for L2capChannelListener<'d, T, P>
impl<'d, T, P> !RefUnwindSafe for L2capChannelListener<'d, T, P>
impl<'d, T, P> !Send for L2capChannelListener<'d, T, P>
impl<'d, T, P> !Sync for L2capChannelListener<'d, T, P>
impl<'d, T, P> Unpin for L2capChannelListener<'d, T, P>
impl<'d, T, P> !UnwindSafe for L2capChannelListener<'d, T, P>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more