diff options
author | metamuffin <metamuffin@disroot.org> | 2022-10-22 12:42:35 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2022-10-22 12:42:35 +0200 |
commit | 5aca67feb3ab9e25ee07ac56896921249d8879fe (patch) | |
tree | 6c9f316a4392cfd27ab7167ef99cece1f6255ad9 /client-native-lib | |
parent | 23c7be33dbb46ce35d53f94a8c6e48aabb7e983c (diff) | |
download | keks-meet-5aca67feb3ab9e25ee07ac56896921249d8879fe.tar keks-meet-5aca67feb3ab9e25ee07ac56896921249d8879fe.tar.bz2 keks-meet-5aca67feb3ab9e25ee07ac56896921249d8879fe.tar.zst |
stuff
Diffstat (limited to 'client-native-lib')
-rw-r--r-- | client-native-lib/src/instance.rs | 1 | ||||
-rw-r--r-- | client-native-lib/src/lib.rs | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/client-native-lib/src/instance.rs b/client-native-lib/src/instance.rs index 6303ba7..74e6f3d 100644 --- a/client-native-lib/src/instance.rs +++ b/client-native-lib/src/instance.rs @@ -27,6 +27,7 @@ pub struct Instance { my_id: RwLock<Option<usize>>, pub peers: RwLock<HashMap<usize, Arc<Peer>>>, } + impl Instance { pub async fn new(config: Config, event_handler: Arc<dyn EventHandler>) -> Arc<Self> { let conn = signaling::SignalingConnection::new(&config.signaling_uri, &config.secret).await; diff --git a/client-native-lib/src/lib.rs b/client-native-lib/src/lib.rs index ed434eb..2e9aed4 100644 --- a/client-native-lib/src/lib.rs +++ b/client-native-lib/src/lib.rs @@ -9,7 +9,7 @@ use futures_util::Future; use peer::{Peer, TransportChannel}; -use protocol::ProvideInfo; +use protocol::{ProvideInfo, RelayMessage}; use std::{pin::Pin, sync::Arc}; use webrtc::{ api::{ @@ -59,4 +59,7 @@ pub trait EventHandler: Send + Sync + 'static { resource: &ProvideInfo, channel: TransportChannel, ) -> DynFut<()>; + fn on_relay(&self, peer: Arc<Peer>, message: &RelayMessage) -> DynFut<()> { + Box::pin(async move {}) + } } |