pub struct AvctpPeer { /* private fields */ }
Expand description
Peer connection to a remote device uses AVCTP protocol over an L2CAP socket. Used by the AVC peer that encapsulates this peer connection and directly in AVRCP for non AV\C connections like the browse channel.
Implementations§
Source§impl Peer
impl Peer
Sourcepub fn new(channel: Channel) -> Self
pub fn new(channel: Channel) -> Self
Create a new peer object from a established L2CAP socket with the peer.
Sourcepub fn take_command_stream(&self) -> CommandStream
pub fn take_command_stream(&self) -> CommandStream
Returns a stream of incoming commands from a remote peer. Stream returns Command objects on success that can be used to send back responses.
Sourcepub fn send_command(
&self,
payload: &[u8],
) -> Result<CommandResponseStream, Error>
pub fn send_command( &self, payload: &[u8], ) -> Result<CommandResponseStream, Error>
Send an outgoing command to the remote peer. Returns a CommandResponseStream to handle incoming response packets.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Peer
impl !RefUnwindSafe for Peer
impl Send for Peer
impl Sync for Peer
impl Unpin for Peer
impl !UnwindSafe for Peer
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