pub enum ProviderRequest {
StreamSocketWithOptions {
domain: Domain,
proto: StreamSocketProtocol,
opts: SocketCreationOptions,
responder: ProviderStreamSocketWithOptionsResponder,
},
StreamSocket {
domain: Domain,
proto: StreamSocketProtocol,
responder: ProviderStreamSocketResponder,
},
DatagramSocketDeprecated {
domain: Domain,
proto: DatagramSocketProtocol,
responder: ProviderDatagramSocketDeprecatedResponder,
},
DatagramSocket {
domain: Domain,
proto: DatagramSocketProtocol,
responder: ProviderDatagramSocketResponder,
},
DatagramSocketWithOptions {
domain: Domain,
proto: DatagramSocketProtocol,
opts: SocketCreationOptions,
responder: ProviderDatagramSocketWithOptionsResponder,
},
InterfaceIndexToName {
index: u64,
responder: ProviderInterfaceIndexToNameResponder,
},
InterfaceNameToIndex {
name: String,
responder: ProviderInterfaceNameToIndexResponder,
},
InterfaceNameToFlags {
name: String,
responder: ProviderInterfaceNameToFlagsResponder,
},
GetInterfaceAddresses {
responder: ProviderGetInterfaceAddressesResponder,
},
}
Expand description
Provider implements the POSIX sockets API.
Warning: This protocol is not yet ready for direct use by clients. Instead, clients should use the BSD sockets API to interact with sockets. We plan to change this protocol substantially and clients that couple directly to this protocol will make those changes more difficult.
Variants§
StreamSocketWithOptions
Requests a stream socket with the specifed parameters and the creation options.
Fields
proto: StreamSocketProtocol
opts: SocketCreationOptions
responder: ProviderStreamSocketWithOptionsResponder
StreamSocket
Requests a stream socket with the specified parameters.
DatagramSocketDeprecated
Requests a datagram socket with the specified parameters. TODO(https://fxbug.dev/42165881): Remove this method once no more callers rely on it.
DatagramSocket
Requests a datagram socket with the specified parameters.
DatagramSocketWithOptions
Requests a datagram socket with the specifed parameters and the creation options.
Fields
proto: DatagramSocketProtocol
opts: SocketCreationOptions
responder: ProviderDatagramSocketWithOptionsResponder
InterfaceIndexToName
Looks up an interface by its index and returns its name. Returns
ZX_ERR_NOT_FOUND
if the specified index doesn’t exist.
InterfaceNameToIndex
Looks up an interface by its name and returns its index. Returns
ZX_ERR_NOT_FOUND
if the specified name doesn’t exist.
InterfaceNameToFlags
Looks up an interface by its name and returns its flags. Returns
ZX_ERR_NOT_FOUND
if the specified name doesn’t exist.
GetInterfaceAddresses
Requests a list of [fuchsia.posix.socket.InterfaceAddresses
]
describing the network interfaces on the system.
Fields
responder: ProviderGetInterfaceAddressesResponder
Implementations§
Source§impl ProviderRequest
impl ProviderRequest
pub fn into_stream_socket_with_options( self, ) -> Option<(Domain, StreamSocketProtocol, SocketCreationOptions, ProviderStreamSocketWithOptionsResponder)>
pub fn into_stream_socket( self, ) -> Option<(Domain, StreamSocketProtocol, ProviderStreamSocketResponder)>
pub fn into_datagram_socket_deprecated( self, ) -> Option<(Domain, DatagramSocketProtocol, ProviderDatagramSocketDeprecatedResponder)>
pub fn into_datagram_socket( self, ) -> Option<(Domain, DatagramSocketProtocol, ProviderDatagramSocketResponder)>
pub fn into_datagram_socket_with_options( self, ) -> Option<(Domain, DatagramSocketProtocol, SocketCreationOptions, ProviderDatagramSocketWithOptionsResponder)>
pub fn into_interface_index_to_name( self, ) -> Option<(u64, ProviderInterfaceIndexToNameResponder)>
pub fn into_interface_name_to_index( self, ) -> Option<(String, ProviderInterfaceNameToIndexResponder)>
pub fn into_interface_name_to_flags( self, ) -> Option<(String, ProviderInterfaceNameToFlagsResponder)>
pub fn into_get_interface_addresses( self, ) -> Option<ProviderGetInterfaceAddressesResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL