/// Reserves the next available ServerChannel for a client represented by a `proxy`.
///
/// If allocated, returns the ServerChannel assigned to the client, None otherwise.
Reserves the next available ServerChannel for a client represented by a `proxy`.
If allocated, returns the ServerChannel assigned to the client, None otherwise.
Reserves the next available ServerChannel for a client represented by a ` proxy ` . If allocated returns the ServerChannel assigned to the client None otherwise .
pub async fn new_client(&self, proxy: bredr::ConnectionReceiverProxy) -> Option<ServerChannel> {
        let mut inner = self.inner.lock().await;
        let new_channel =
            ServerChannel::all().find(|sc| !inner.channel_receivers.contains_key(&sc));
        new_channel.map(|channel| {
            trace!("Reserving RFCOMM channel: {:?}", channel);
            let tagged_client = RegisteredClient {
                connection_receiver: proxy,
                _channel_number: inner
                    .inspect_node
                    .create_uint(inspect::unique_name("channel_number"), u8::from(channel) as u64),
            };
            let _ = inner.channel_receivers.insert(channel, tagged_client);
            channel
        })
    }
pub async fn new_client ( & self , proxy : bredr :: ConnectionReceiverProxy ) -> Option < ServerChannel > { let mut inner = self . inner . lock ( ) . await ; let new_channel = ServerChannel :: all ( ) . find ( | sc | ! inner . channel_receivers . contains_key ( & sc ) ) ; new_channel . map ( | channel | { trace ! ( " " channel ) ; let tagged_client = RegisteredClient { connection_receiver : proxy , _channel_number : inner . inspect_node . create_uint ( inspect :: unique_name ( " " ) , u8 :: from ( channel ) as u64 ) , } ; let _ = inner . channel_receivers . insert ( channel , tagged_client ) ; channel } ) }
Reserves the next available ServerChannel for a client represented by a `proxy`.
Reserves the next available ServerChannel for a client represented by a ` proxy ` .
&self
proxy
bredr::ConnectionReceiverProxy