mirror of
https://github.com/rustdesk/hbb_common.git
synced 2026-05-25 17:19:15 +00:00
move out dummy webrtc mod
This commit is contained in:
46
examples/webrtc_dummy.rs
Normal file
46
examples/webrtc_dummy.rs
Normal file
@@ -0,0 +1,46 @@
|
||||
use std::io::Error;
|
||||
|
||||
use bytes::BytesMut;
|
||||
|
||||
use hbb_common::ResultType;
|
||||
|
||||
pub struct WebRTCStream {
|
||||
// mock struct
|
||||
}
|
||||
|
||||
impl Clone for WebRTCStream {
|
||||
fn clone(&self) -> Self {
|
||||
WebRTCStream {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl WebRTCStream {
|
||||
|
||||
pub async fn new(
|
||||
_: &str,
|
||||
_: u64,
|
||||
) -> ResultType<Self> {
|
||||
Ok(Self {})
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub async fn get_local_endpoint(&self) -> ResultType<String> {
|
||||
Ok(String::new())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub async fn set_remote_endpoint(&self, _: &str) -> ResultType<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub async fn send_bytes(&mut self, _: bytes::Bytes) -> ResultType<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub async fn next(&mut self) -> Option<Result<BytesMut, Error>> {
|
||||
None
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user