pub struct ControlSynchronousProxy { /* private fields */ }Implementations§
Source§impl ControlSynchronousProxy
impl ControlSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ControlEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ControlEvent, 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 disconnect_ip(
&self,
payload: &ControlDisconnectIpRequest,
___deadline: MonotonicInstant,
) -> Result<DisconnectIpResult, Error>
pub fn disconnect_ip( &self, payload: &ControlDisconnectIpRequest, ___deadline: MonotonicInstant, ) -> Result<DisconnectIpResult, Error>
Disconnect the socket matched by the provided matchers. See
Diagnostics.IterateIp for matcher semantics.
Disconnecting a socket depends on the transport protocol. In all cases,
the next read or write operation will see ECONNABORTED.
- UDP: the behavior is equivalent to calling
fuchsia.posix.socket/*.Disconnect. Any destination port and address, and bound device are removed. The socket may be reused. - TCP LISTEN state: TCP moves to state CLOSE. All non-accepted sockets are closed and an RST is sent to the peer. The socket may be reused.
- TCP all other states: The TCP connection is put in state CLOSE and an RST is sent to the remote peer, if required. The socket may not be reused.
If no matchers are specified, or the provided matchers match all sockets, an error is returned and no action is taken.
NOTE: This operation is asynchronous. While the internal state of the socket is updated before this call returns, propagation of the error to an application is unsynchronized. Subsequent operations (such as TCP reads and writes) may not immediately see the error.
NOTE: For UDP sockets, the receive buffer is not cleared, so it’s possible for a socket to be interrupted, but still read pending datagrams. This is in order to maintain compatibility with Linux.
Trait Implementations§
Source§impl Debug for ControlSynchronousProxy
impl Debug for ControlSynchronousProxy
Source§impl From<Channel> for ControlSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for ControlSynchronousProxy
Source§impl From<ControlSynchronousProxy> for NullableHandle
Available on Fuchsia only.
impl From<ControlSynchronousProxy> for NullableHandle
Source§fn from(value: ControlSynchronousProxy) -> Self
fn from(value: ControlSynchronousProxy) -> Self
Source§impl FromClient for ControlSynchronousProxy
Available on Fuchsia only.
impl FromClient for ControlSynchronousProxy
Source§type Protocol = ControlMarker
type Protocol = ControlMarker
Source§fn from_client(value: ClientEnd<ControlMarker>) -> Self
fn from_client(value: ClientEnd<ControlMarker>) -> Self
Source§impl SynchronousProxy for ControlSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for ControlSynchronousProxy
Source§type Proxy = ControlProxy
type Proxy = ControlProxy
Source§type Protocol = ControlMarker
type Protocol = ControlMarker
Proxy controls.