pub struct MeshHandle { /* private fields */ }Expand description
Cloneable handle for sending commands without owning the event stream.
Implementations§
Source§impl MeshHandle
impl MeshHandle
Sourcepub async fn broadcast_voice(
&self,
seq: u32,
timestamp: u64,
payload: Vec<u8>,
) -> Result<()>
pub async fn broadcast_voice( &self, seq: u32, timestamp: u64, payload: Vec<u8>, ) -> Result<()>
Broadcast a voice packet to all peers.
Sourcepub async fn broadcast_chat(&self, text: String) -> Result<()>
pub async fn broadcast_chat(&self, text: String) -> Result<()>
Broadcast a chat message to all peers.
Sourcepub async fn start_call(&self, to: PeerId) -> Result<SessionId>
pub async fn start_call(&self, to: PeerId) -> Result<SessionId>
Start a call with a specific peer.
Sourcepub async fn start_call_with_srt(
&self,
to: PeerId,
rndzv_srt_uri: Option<String>,
) -> Result<SessionId>
pub async fn start_call_with_srt( &self, to: PeerId, rndzv_srt_uri: Option<String>, ) -> Result<SessionId>
Start a call with an optional rndzv SRT URI attached.
Sourcepub async fn accept_call(&self, session: SessionId) -> Result<()>
pub async fn accept_call(&self, session: SessionId) -> Result<()>
Accept a pending call.
Sourcepub async fn decline_call(
&self,
session: SessionId,
reason: Option<String>,
) -> Result<()>
pub async fn decline_call( &self, session: SessionId, reason: Option<String>, ) -> Result<()>
Decline a pending call with an optional reason.
Sourcepub async fn set_preferred_codecs(&self, codecs: Vec<CodecId>)
pub async fn set_preferred_codecs(&self, codecs: Vec<CodecId>)
Update preferred codecs for capability negotiation.
Sourcepub async fn set_preferred_features(&self, features: Vec<FeatureFlag>)
pub async fn set_preferred_features(&self, features: Vec<FeatureFlag>)
Update preferred feature flags for capability negotiation.
Sourcepub async fn peer_session_config(
&self,
peer_id: PeerId,
) -> Option<SessionConfig>
pub async fn peer_session_config( &self, peer_id: PeerId, ) -> Option<SessionConfig>
Retrieve the current session config for a peer.
Sourcepub async fn group_codec(&self) -> CodecId
pub async fn group_codec(&self) -> CodecId
Return the current group codec.
Sourcepub async fn connect_addr(&self, addr: SocketAddr) -> Result<()>
pub async fn connect_addr(&self, addr: SocketAddr) -> Result<()>
Initiate a connection to a socket address.
Sourcepub async fn connect_with_socket(
&self,
socket: UdpSocket,
addr: SocketAddr,
) -> Result<()>
pub async fn connect_with_socket( &self, socket: UdpSocket, addr: SocketAddr, ) -> Result<()>
Initiate a connection using a pre-bound socket.
Sourcepub async fn disconnect_peer(&self, peer_id: PeerId)
pub async fn disconnect_peer(&self, peer_id: PeerId)
Disconnect a peer and clean up any related routes.
Sourcepub async fn run_rendezvous(
&self,
cfg: RendezvousConfig,
) -> Result<RendezvousResult, RendezvousError>
pub async fn run_rendezvous( &self, cfg: RendezvousConfig, ) -> Result<RendezvousResult, RendezvousError>
Run Predictive Rendezvous over the mesh UDP socket.
This drives slot emission and listens for matching probes. See
docs/predictive-rendezvous.md for the conceptual model.
Trait Implementations§
Source§impl Clone for MeshHandle
impl Clone for MeshHandle
Source§fn clone(&self) -> MeshHandle
fn clone(&self) -> MeshHandle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for MeshHandle
impl !RefUnwindSafe for MeshHandle
impl Send for MeshHandle
impl Sync for MeshHandle
impl Unpin for MeshHandle
impl !UnwindSafe for MeshHandle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more