pub struct EpskcSynchronousProxy { /* private fields */ }
Implementations§
Source§impl EpskcSynchronousProxy
impl EpskcSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<EpskcEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<EpskcEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn start_ephemeral_key(
&self,
lifetime: u32,
___deadline: MonotonicInstant,
) -> Result<EpskcStartEphemeralKeyResult, Error>
pub fn start_ephemeral_key( &self, lifetime: u32, ___deadline: MonotonicInstant, ) -> Result<EpskcStartEphemeralKeyResult, Error>
Starts the ephemeral key handler.
The ePSKc functionality must first be enabled via fuchsia.lowpan.thread/FeatureConnector.
The lifetime is in units of milliseconds.
From OpenThread:
When successfully set, the ephemeral key can be used only once by an external commissioner candidate to establish a secure session. After the commissioner candidate disconnects, the use of the ephemeral key is stopped.
The maximum ephemeral key lifetime is 10 minutes.
If a lifetime of 0 is provided, OpenThread will use its default lifetime of 2 minutes.
If the lifetime expires, the use of the ephemeral key is stopped, and any connected session using the key is immediately disconnected.
The Ephemeral Key Manager limits the number of failed DTLS connections to 10 attempts. After the 10th failed attempt, the use of the ephemeral key is automatically stopped (even if the lifetime has not yet expired).
ZX_ERR_INVALID_ARGS
: The specified lifetime is greater than allowed.ZX_ERR_BAD_STATE
: The ePSKc functionality has not been enabled.ZX_ERR_INTERNAL
: There was a failure in generating the ephemeral key.`
Sourcepub fn stop_ephemeral_key(
&self,
retain_active_session: bool,
___deadline: MonotonicInstant,
) -> Result<EpskcStopEphemeralKeyResult, Error>
pub fn stop_ephemeral_key( &self, retain_active_session: bool, ___deadline: MonotonicInstant, ) -> Result<EpskcStopEphemeralKeyResult, Error>
Stops the ephemeral key use.
Existing sessions are terminated if retain_active_session is false. If retain_active_session is true and there is an ongoing session, the ephemeral key is not stopped.
The ePSKc functionality must first be enabled via fuchsia.lowpan.thread/FeatureConnector.
ZX_ERR_BAD_STATE
: The ePSKc functionality has not been enabled orretain_active_session
is true and there is an active session.
Trait Implementations§
Source§impl Debug for EpskcSynchronousProxy
impl Debug for EpskcSynchronousProxy
Source§impl From<Channel> for EpskcSynchronousProxy
impl From<Channel> for EpskcSynchronousProxy
Source§impl From<EpskcSynchronousProxy> for Handle
impl From<EpskcSynchronousProxy> for Handle
Source§fn from(value: EpskcSynchronousProxy) -> Self
fn from(value: EpskcSynchronousProxy) -> Self
Source§impl FromClient for EpskcSynchronousProxy
impl FromClient for EpskcSynchronousProxy
Source§type Protocol = EpskcMarker
type Protocol = EpskcMarker
Source§fn from_client(value: ClientEnd<EpskcMarker>) -> Self
fn from_client(value: ClientEnd<EpskcMarker>) -> Self
Source§impl SynchronousProxy for EpskcSynchronousProxy
impl SynchronousProxy for EpskcSynchronousProxy
Source§type Proxy = EpskcProxy
type Proxy = EpskcProxy
Source§type Protocol = EpskcMarker
type Protocol = EpskcMarker
Proxy
controls.