reorganize files
This commit is contained in:
parent
6fd6bdcbbc
commit
73342d5dd7
|
@ -0,0 +1,9 @@
|
|||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub mod tungstenite;
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub type Sink = tungstenite::TungsteniteSink;
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub type Stream = tungstenite::TungsteniteStream;
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub type WebSocketBackend = tungstenite::TungsteniteBackend;
|
|
@ -7,8 +7,8 @@ use tokio_tungstenite::{
|
|||
connect_async_tls_with_config, tungstenite, Connector, MaybeTlsStream, WebSocketStream,
|
||||
};
|
||||
|
||||
use super::GatewayMessage;
|
||||
use crate::errors::GatewayError;
|
||||
use crate::gateway::GatewayMessage;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct TungsteniteBackend;
|
|
@ -1,13 +1,13 @@
|
|||
use async_trait::async_trait;
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub mod backend_tungstenite;
|
||||
pub mod backends;
|
||||
pub mod events;
|
||||
pub mod gateway;
|
||||
pub mod handle;
|
||||
pub mod heartbeat;
|
||||
pub mod message;
|
||||
|
||||
pub use backends::*;
|
||||
pub use gateway::*;
|
||||
pub use handle::*;
|
||||
use heartbeat::*;
|
||||
|
@ -22,13 +22,6 @@ use std::sync::{Arc, RwLock};
|
|||
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub type Sink = backend_tungstenite::TungsteniteSink;
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub type Stream = backend_tungstenite::TungsteniteStream;
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub type WebSocketBackend = backend_tungstenite::TungsteniteBackend;
|
||||
|
||||
// Gateway opcodes
|
||||
/// Opcode received when the server dispatches a [crate::types::WebSocketEvent]
|
||||
const GATEWAY_DISPATCH: u8 = 0;
|
||||
|
|
Loading…
Reference in New Issue