diff --git a/src/gateway/wasm/gateway.rs b/src/gateway/wasm/gateway.rs index 8b13789..5a54efb 100644 --- a/src/gateway/wasm/gateway.rs +++ b/src/gateway/wasm/gateway.rs @@ -1 +1 @@ - +use ws_stream_wasm::*; diff --git a/src/gateway/wasm/heartbeat.rs b/src/gateway/wasm/heartbeat.rs new file mode 100644 index 0000000..b7346fa --- /dev/null +++ b/src/gateway/wasm/heartbeat.rs @@ -0,0 +1,14 @@ +use tokio::task::JoinHandle; + +use super::*; + +#[allow(dead_code)] // FIXME: Remove this, once used +#[derive(Debug)] +pub struct WasmHeartbeatHandler { + /// How ofter heartbeats need to be sent at a minimum + pub heartbeat_interval: Duration, + /// The send channel for the heartbeat thread + pub send: Sender, + /// The handle of the thread + handle: JoinHandle<()>, +} diff --git a/src/gateway/wasm/mod.rs b/src/gateway/wasm/mod.rs index 73a5181..cdcf007 100644 --- a/src/gateway/wasm/mod.rs +++ b/src/gateway/wasm/mod.rs @@ -1,2 +1,5 @@ pub mod gateway; -pub use gateway::*; +pub mod heartbeat; +use super::*; +use gateway::*; +use heartbeat::*;