pub enum BaseSocketRequest {
Show 31 variants
Clone {
request: ServerEnd<CloneableMarker>,
control_handle: BaseSocketControlHandle,
},
Close {
responder: BaseSocketCloseResponder,
},
Query {
responder: BaseSocketQueryResponder,
},
SetReuseAddress {
value: bool,
responder: BaseSocketSetReuseAddressResponder,
},
GetReuseAddress {
responder: BaseSocketGetReuseAddressResponder,
},
GetError {
responder: BaseSocketGetErrorResponder,
},
SetBroadcast {
value: bool,
responder: BaseSocketSetBroadcastResponder,
},
GetBroadcast {
responder: BaseSocketGetBroadcastResponder,
},
SetSendBuffer {
value_bytes: u64,
responder: BaseSocketSetSendBufferResponder,
},
GetSendBuffer {
responder: BaseSocketGetSendBufferResponder,
},
SetReceiveBuffer {
value_bytes: u64,
responder: BaseSocketSetReceiveBufferResponder,
},
GetReceiveBuffer {
responder: BaseSocketGetReceiveBufferResponder,
},
SetKeepAlive {
value: bool,
responder: BaseSocketSetKeepAliveResponder,
},
GetKeepAlive {
responder: BaseSocketGetKeepAliveResponder,
},
SetOutOfBandInline {
value: bool,
responder: BaseSocketSetOutOfBandInlineResponder,
},
GetOutOfBandInline {
responder: BaseSocketGetOutOfBandInlineResponder,
},
SetNoCheck {
value: bool,
responder: BaseSocketSetNoCheckResponder,
},
GetNoCheck {
responder: BaseSocketGetNoCheckResponder,
},
SetLinger {
linger: bool,
length_secs: u32,
responder: BaseSocketSetLingerResponder,
},
GetLinger {
responder: BaseSocketGetLingerResponder,
},
SetReusePort {
value: bool,
responder: BaseSocketSetReusePortResponder,
},
GetReusePort {
responder: BaseSocketGetReusePortResponder,
},
GetAcceptConn {
responder: BaseSocketGetAcceptConnResponder,
},
SetBindToDevice {
value: String,
responder: BaseSocketSetBindToDeviceResponder,
},
GetBindToDevice {
responder: BaseSocketGetBindToDeviceResponder,
},
SetBindToInterfaceIndex {
value: u64,
responder: BaseSocketSetBindToInterfaceIndexResponder,
},
GetBindToInterfaceIndex {
responder: BaseSocketGetBindToInterfaceIndexResponder,
},
SetTimestamp {
value: TimestampOption,
responder: BaseSocketSetTimestampResponder,
},
GetTimestamp {
responder: BaseSocketGetTimestampResponder,
},
SetMark {
domain: MarkDomain,
mark: OptionalUint32,
responder: BaseSocketSetMarkResponder,
},
GetMark {
domain: MarkDomain,
responder: BaseSocketGetMarkResponder,
},
}
Expand description
A socket.
Variants§
Clone
Close
Terminates the connection.
After calling Close
, the client must not send any other requests.
Servers, after sending the status response, should close the connection regardless of status and without sending an epitaph.
Closing the client end of the channel should be semantically equivalent
to calling Close
without knowing when the close has completed or its
status.
Fields
responder: BaseSocketCloseResponder
Query
Fields
responder: BaseSocketQueryResponder
SetReuseAddress
Set SOL_SOCKET
-> SO_REUSEADDR
.
GetReuseAddress
Get SOL_SOCKET
-> SO_REUSEADDR
.
Fields
responder: BaseSocketGetReuseAddressResponder
GetError
Get SOL_SOCKET
-> SO_ERROR
.
Returns the last error if there is an error set on the socket.
Fields
responder: BaseSocketGetErrorResponder
SetBroadcast
Set SOL_SOCKET
-> SO_BROADCAST
.
GetBroadcast
Get SOL_SOCKET
-> SO_BROADCAST
.
Fields
responder: BaseSocketGetBroadcastResponder
SetSendBuffer
Set SOL_SOCKET
-> SO_SNDBUF
.
GetSendBuffer
Get SOL_SOCKET
-> SO_SNDBUF
.
Fields
responder: BaseSocketGetSendBufferResponder
SetReceiveBuffer
Set SOL_SOCKET
-> SO_RCVBUF
.
GetReceiveBuffer
Get SOL_SOCKET
-> SO_RCVBUF
.
Fields
responder: BaseSocketGetReceiveBufferResponder
SetKeepAlive
Set SOL_SOCKET
-> SO_KEEPALIVE
.
GetKeepAlive
Get SOL_SOCKET
-> SO_KEEPALIVE
.
Fields
responder: BaseSocketGetKeepAliveResponder
SetOutOfBandInline
Set SOL_SOCKET
-> SO_OOBINLINE
.
GetOutOfBandInline
Get SOL_SOCKET
-> SO_OOBINLINE
.
Fields
responder: BaseSocketGetOutOfBandInlineResponder
SetNoCheck
Set SOL_SOCKET
-> SO_NO_CHECK
.
GetNoCheck
Get SOL_SOCKET
-> SO_NO_CHECK
.
Fields
responder: BaseSocketGetNoCheckResponder
SetLinger
Set SOL_SOCKET
-> SO_LINGER
.
GetLinger
Get SOL_SOCKET
-> SO_LINGER
.
Fields
responder: BaseSocketGetLingerResponder
SetReusePort
Set SOL_SOCKET
-> SO_REUSEPORT
.
GetReusePort
Get SOL_SOCKET
-> SO_REUSEPORT
.
Fields
responder: BaseSocketGetReusePortResponder
GetAcceptConn
Get SOL_SOCKET
-> SO_ACCEPTCONN
.
Fields
responder: BaseSocketGetAcceptConnResponder
SetBindToDevice
Set SOL_SOCKET
-> SO_BINDTODEVICE
.
GetBindToDevice
Get SOL_SOCKET
-> SO_BINDTODEVICE
.
Fields
responder: BaseSocketGetBindToDeviceResponder
SetBindToInterfaceIndex
Set SOL_SOCKET
-> SO_BINDTOIFINDEX
.
If value
is 0, this clears the bound interface.
GetBindToInterfaceIndex
Get SOL_SOCKET
-> SO_BINDTOIFINDEX
.
Fields
responder: BaseSocketGetBindToInterfaceIndexResponder
SetTimestamp
Set SOL_SOCKET
-> SO_TIMESTAMP
or SO_TIMESTAMPNS
.
GetTimestamp
Get SOL_SOCKET
-> SO_TIMESTAMP
or SO_TIMESTAMPNS
.
Fields
responder: BaseSocketGetTimestampResponder
SetMark
Like setting SOL_SOCKET
-> SO_MARK
. The major difference is that
unlike the standard SO_MARK, this API has multiple mark domains and each
mark can be set independently in each domain.
GetMark
Like getting SOL_SOCKET
-> SO_MARK
. The major difference is that
unlike the standard SO_MARK, this API has multiple mark domains and each
mark can be retrieved independently in each domain.
Implementations§
Source§impl BaseSocketRequest
impl BaseSocketRequest
pub fn into_clone( self, ) -> Option<(ServerEnd<CloneableMarker>, BaseSocketControlHandle)>
pub fn into_close(self) -> Option<BaseSocketCloseResponder>
pub fn into_query(self) -> Option<BaseSocketQueryResponder>
pub fn into_set_reuse_address( self, ) -> Option<(bool, BaseSocketSetReuseAddressResponder)>
pub fn into_get_reuse_address( self, ) -> Option<BaseSocketGetReuseAddressResponder>
pub fn into_get_error(self) -> Option<BaseSocketGetErrorResponder>
pub fn into_set_broadcast( self, ) -> Option<(bool, BaseSocketSetBroadcastResponder)>
pub fn into_get_broadcast(self) -> Option<BaseSocketGetBroadcastResponder>
pub fn into_set_send_buffer( self, ) -> Option<(u64, BaseSocketSetSendBufferResponder)>
pub fn into_get_send_buffer(self) -> Option<BaseSocketGetSendBufferResponder>
pub fn into_set_receive_buffer( self, ) -> Option<(u64, BaseSocketSetReceiveBufferResponder)>
pub fn into_get_receive_buffer( self, ) -> Option<BaseSocketGetReceiveBufferResponder>
pub fn into_set_keep_alive( self, ) -> Option<(bool, BaseSocketSetKeepAliveResponder)>
pub fn into_get_keep_alive(self) -> Option<BaseSocketGetKeepAliveResponder>
pub fn into_set_out_of_band_inline( self, ) -> Option<(bool, BaseSocketSetOutOfBandInlineResponder)>
pub fn into_get_out_of_band_inline( self, ) -> Option<BaseSocketGetOutOfBandInlineResponder>
pub fn into_set_no_check(self) -> Option<(bool, BaseSocketSetNoCheckResponder)>
pub fn into_get_no_check(self) -> Option<BaseSocketGetNoCheckResponder>
pub fn into_set_linger( self, ) -> Option<(bool, u32, BaseSocketSetLingerResponder)>
pub fn into_get_linger(self) -> Option<BaseSocketGetLingerResponder>
pub fn into_set_reuse_port( self, ) -> Option<(bool, BaseSocketSetReusePortResponder)>
pub fn into_get_reuse_port(self) -> Option<BaseSocketGetReusePortResponder>
pub fn into_get_accept_conn(self) -> Option<BaseSocketGetAcceptConnResponder>
pub fn into_set_bind_to_device( self, ) -> Option<(String, BaseSocketSetBindToDeviceResponder)>
pub fn into_get_bind_to_device( self, ) -> Option<BaseSocketGetBindToDeviceResponder>
pub fn into_set_bind_to_interface_index( self, ) -> Option<(u64, BaseSocketSetBindToInterfaceIndexResponder)>
pub fn into_get_bind_to_interface_index( self, ) -> Option<BaseSocketGetBindToInterfaceIndexResponder>
pub fn into_set_timestamp( self, ) -> Option<(TimestampOption, BaseSocketSetTimestampResponder)>
pub fn into_get_timestamp(self) -> Option<BaseSocketGetTimestampResponder>
pub fn into_set_mark( self, ) -> Option<(MarkDomain, OptionalUint32, BaseSocketSetMarkResponder)>
pub fn into_get_mark(self) -> Option<(MarkDomain, BaseSocketGetMarkResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL