pub struct AlpineClient { /* private fields */ }Expand description
High-level client that wraps the ALPINE protocol primitives.
Implementations§
Source§impl AlpineClient
impl AlpineClient
Sourcepub async fn connect(
local_addr: SocketAddr,
remote_addr: SocketAddr,
identity: DeviceIdentity,
capabilities: CapabilitySet,
credentials: NodeCredentials,
) -> Result<Self, AlpineSdkError>
pub async fn connect( local_addr: SocketAddr, remote_addr: SocketAddr, identity: DeviceIdentity, capabilities: CapabilitySet, credentials: NodeCredentials, ) -> Result<Self, AlpineSdkError>
Opens a session with the provided device identity and capabilities.
Sourcepub fn start_stream(
&mut self,
profile: StreamProfile,
) -> Result<String, AlpineSdkError>
pub fn start_stream( &mut self, profile: StreamProfile, ) -> Result<String, AlpineSdkError>
Starts streaming with the supplied profile and returns the generated config id.
Sourcepub fn send_frame(
&self,
channel_format: ChannelFormat,
channels: Vec<u16>,
priority: u8,
groups: Option<HashMap<String, Vec<u16>>>,
metadata: Option<HashMap<String, Value>>,
) -> Result<(), AlpineSdkError>
pub fn send_frame( &self, channel_format: ChannelFormat, channels: Vec<u16>, priority: u8, groups: Option<HashMap<String, Vec<u16>>>, metadata: Option<HashMap<String, Value>>, ) -> Result<(), AlpineSdkError>
Sends a streaming frame over the active session.
Sourcepub fn control_envelope(
&self,
seq: u64,
op: ControlOp,
payload: Value,
) -> Result<ControlEnvelope, HandshakeError>
pub fn control_envelope( &self, seq: u64, op: ControlOp, payload: Value, ) -> Result<ControlEnvelope, HandshakeError>
Builds a signed control envelope for the active session.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AlpineClient
impl !RefUnwindSafe for AlpineClient
impl Send for AlpineClient
impl Sync for AlpineClient
impl Unpin for AlpineClient
impl !UnwindSafe for AlpineClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more