pub enum ControlRequest {
DisconnectIp {
payload: ControlDisconnectIpRequest,
responder: ControlDisconnectIpResponder,
},
}Expand description
Provides control operations on sockets.
Variants§
DisconnectIp
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.
Implementations§
Source§impl ControlRequest
impl ControlRequest
pub fn into_disconnect_ip( self, ) -> Option<(ControlDisconnectIpRequest, ControlDisconnectIpResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL