pub enum WakeGroupRequest {
WaitForData {
responder: WakeGroupWaitForDataResponder,
},
Arm {
responder: WakeGroupArmResponder,
},
}
Expand description
A group of networking resources, such as sockets, for which the client wishes to receive a notification when data is available.
This may be useful to, for example, allow a client to suspend execution until it is notified that some data is available to be processed.
Each connection to this protocol represents a distinct wake group.
Variants§
WaitForData
Registers the client to be woken up (in the form of a response) when there is incoming data available for any of the resources registered with this wake group.
Note that the client is required to “arm” this hanging get by calling
Arm
in order to ensure a response. Once the WaitForData
call has
returned, the next call to the method will hang until Arm
has been
called again and new data has arrived. In other words, Arm
re-arms
the hanging get and should be called when a response is required in
order to be woken up.
If the caller is responsible for keeping the system awake while handling the incoming data, the netstack will delegate (baton-pass) a lease to the caller that it can retain until it is ready to allow the system to suspend.
Fields
responder: WakeGroupWaitForDataResponder
Arm
Notifies the netstack that the client has handled any previous
WaitForData
response that has arrived on the channel, and expects to
be woken up again when data arrives, in the form of a response to the
pending WaitForData
call.
In other words, calling this method “re-arms” the hanging get.
Fields
responder: WakeGroupArmResponder
Implementations§
Source§impl WakeGroupRequest
impl WakeGroupRequest
pub fn into_wait_for_data(self) -> Option<WakeGroupWaitForDataResponder>
pub fn into_arm(self) -> Option<WakeGroupArmResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL