pub struct ConnectedSocket<A: PtpAddressFamily> { /* private fields */ }Expand description
A socket that connected to a specific remote.
Will only send and receive messages to the specific remote specified when
opening the socket with Interface::connected_socket.
Implementations§
Source§impl<A: PtpAddressFamily> ConnectedSocket<A>
impl<A: PtpAddressFamily> ConnectedSocket<A>
Sourcepub async fn recv(&mut self) -> Result<RecvResult<A>>
pub async fn recv(&mut self) -> Result<RecvResult<A>>
Source§impl<A: PtpAddressFamily> ConnectedSocket<A>
impl<A: PtpAddressFamily> ConnectedSocket<A>
Sourcepub async fn send_event(&self, buf: &[u8]) -> Result<Option<UniversalTimestamp>>
pub async fn send_event(&self, buf: &[u8]) -> Result<Option<UniversalTimestamp>>
Send an event message
Send the event message to the connected remote.
Returns the actual time the message was sent if the operating system was able to provide this.
§Errors
Returns any IO errors that occured trying to send the message.
Trait Implementations§
Source§impl<A: PtpAddressFamily> Drop for ConnectedSocket<A>
impl<A: PtpAddressFamily> Drop for ConnectedSocket<A>
Auto Trait Implementations§
impl<A> Forget for ConnectedSocket<A>
impl<A> Freeze for ConnectedSocket<A>
impl<A> Move for ConnectedSocket<A>
impl<A> RefUnwindSafe for ConnectedSocket<A>
impl<A> Send for ConnectedSocket<A>
impl<A> Sync for ConnectedSocket<A>
impl<A> Unpin for ConnectedSocket<A>
impl<A> UnsafeUnpin for ConnectedSocket<A>
impl<A> UnwindSafe for ConnectedSocket<A>
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