pub enum ChannelRequest {
Send_ {
packets: Vec<Packet>,
responder: ChannelSend_Responder,
},
Receive {
responder: ChannelReceiveResponder,
},
WatchChannelParameters {
responder: ChannelWatchChannelParametersResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: ChannelControlHandle,
method_type: MethodType,
},
}
Expand description
A duplex channel for sending/recieving Packet
s. This protocol also
serves as a token to keeping the Channel
open. Closing this protocol (and
the associated socket
for BR/EDR channels) will close the underlying
channel.
Variants§
Send_
Send multiple packets of data over the channel. Only one Send
may be pending at a time.
Receive
Hanging get that waits for inbound packets. Only one Receive
may be pending at a time.
Fields
responder: ChannelReceiveResponder
WatchChannelParameters
For RFCOMM channels, this will not return and calls will hang indefinitely.
For BR/EDR L2CAP connection-oriented channels this will currently not
return and calls will hang indefinitely. The initial channel parameters
are provided in [fuchsia.bluetooth.bredr/Channel
].
For LE L2CAP connection-oriented channels, the first call will
immediately return the parameters of the remote side of the channel.
Subsequent calls will hang until the ChannelParameters
change, at
which point it will return the new parameters, including those that have
not changed.
Fields
responder: ChannelWatchChannelParametersResponder
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: ChannelControlHandle
method_type: MethodType
Implementations§
Source§impl ChannelRequest
impl ChannelRequest
pub fn into_send_(self) -> Option<(Vec<Packet>, ChannelSend_Responder)>
pub fn into_receive(self) -> Option<ChannelReceiveResponder>
pub fn into_watch_channel_parameters( self, ) -> Option<ChannelWatchChannelParametersResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL