pub struct EventSocket { /* private fields */ }Expand description
Async GVCP message channel socket.
Implementations§
Source§impl EventSocket
impl EventSocket
Sourcepub async fn bind(local_ip: IpAddr, port: u16) -> Result<Self>
pub async fn bind(local_ip: IpAddr, port: u16) -> Result<Self>
Bind a GVCP message socket on the provided local address.
Sourcepub async fn recv(&self) -> Result<EventPacket>
pub async fn recv(&self) -> Result<EventPacket>
Receive and parse the next GVCP event.
A datagram carrying several events is decoded once and drained across successive calls. When the device set the acknowledge-required flag the acknowledgement is sent before any of its events are returned — a device that does not get one will retransmit.
Concurrent callers are symmetric consumers of one queue, and none of
them is promised the event its own recv_from decoded.
Sourcepub fn local_addr(&self) -> Result<SocketAddr>
pub fn local_addr(&self) -> Result<SocketAddr>
Return the local address bound to the socket.
Auto Trait Implementations§
impl !Freeze for EventSocket
impl !RefUnwindSafe for EventSocket
impl Send for EventSocket
impl Sync for EventSocket
impl Unpin for EventSocket
impl UnsafeUnpin for EventSocket
impl UnwindSafe for EventSocket
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