pub enum AdvertisedPeripheralRequest {
OnConnected {
peer: Peer,
connection: ClientEnd<ConnectionMarker>,
responder: AdvertisedPeripheralOnConnectedResponder,
},
}
Expand description
Protocol that is valid for the duration of advertising. The caller can close the protocol to stop advertising. If the system internally stops advertising for any reason, the protocol will be closed to communicate this to the client.
Variants§
OnConnected
Called when a remote LE central connects to this peripheral when
connectable advertising is enabled via
[fuchsia.bluetooth.le/Peripheral.Advertise
]. When this call is made,
the system has paused advertising, and will not continue until it
receives a response.
The returned [fuchsia.bluetooth.le/Connection
] protocol can be used to
interact with the peer. It also represents a peripheral’s ownership over
the connection: the client can drop the protocol to request a
disconnection. Similarly, the protocol is closed by the system to
indicate that the connection to the peer has been lost.
- request
peer
Information about the central that initiated the connection. - request
connection
Represents the connection.
- response An empty response should be sent to acknowledge the connection and resume advertising (for flow control).
Implementations§
Source§impl AdvertisedPeripheralRequest
impl AdvertisedPeripheralRequest
pub fn into_on_connected( self, ) -> Option<(Peer, ClientEnd<ConnectionMarker>, AdvertisedPeripheralOnConnectedResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL