pub struct ControlProxy { /* private fields */ }Implementations§
Source§impl ControlProxy
impl ControlProxy
Sourcepub fn take_event_stream(&self) -> ControlEventStream
pub fn take_event_stream(&self) -> ControlEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn disconnect_ip(
&self,
payload: &ControlDisconnectIpRequest,
) -> QueryResponseFut<DisconnectIpResult, DefaultFuchsiaResourceDialect>
pub fn disconnect_ip( &self, payload: &ControlDisconnectIpRequest, ) -> QueryResponseFut<DisconnectIpResult, DefaultFuchsiaResourceDialect>
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 Clone for ControlProxy
impl Clone for ControlProxy
Source§fn clone(&self) -> ControlProxy
fn clone(&self) -> ControlProxy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ControlProxyInterface for ControlProxy
impl ControlProxyInterface for ControlProxy
type DisconnectIpResponseFut = QueryResponseFut<DisconnectIpResult>
fn disconnect_ip( &self, payload: &ControlDisconnectIpRequest, ) -> Self::DisconnectIpResponseFut
Source§impl Debug for ControlProxy
impl Debug for ControlProxy
Source§impl Proxy for ControlProxy
impl Proxy for ControlProxy
Source§type Protocol = ControlMarker
type Protocol = ControlMarker
Proxy controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Source§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Source§fn on_closed(&self) -> OnSignals<'_, Unowned<'_, NullableHandle>>
fn on_closed(&self) -> OnSignals<'_, Unowned<'_, NullableHandle>>
PEER_CLOSED signal.