pub struct SnoopSynchronousProxy { /* private fields */ }
Implementations§
source§impl SnoopSynchronousProxy
impl SnoopSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(&self, deadline: Time) -> Result<SnoopEvent, Error>
pub fn wait_for_event(&self, deadline: Time) -> Result<SnoopEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
sourcepub fn start(
&self,
follow: bool,
host_device: Option<&str>,
___deadline: Time
) -> Result<Status, Error>
pub fn start( &self, follow: bool, host_device: Option<&str>, ___deadline: Time ) -> Result<Status, Error>
Subscribe to receive packets from the server. Packets that have been recorded are sent first.
If follow
is true, the channel stays open and packets are sent to the client as
the snoop server receives them. If follow
is false, the channel is closed by the server
when all recorded packets have been sent.
A host_device
name may be provided; if so, only events from that host are sent to the client.
If host_device
is absent, the client is sent events from all host devices.
Errors:
Start
can only be called once per connection. After the first request, subsequent requests
always return an error.
host_device
values that are not recognized by the server return an error.