Skip to content

Commit

Permalink
Move HEARTBEAT_ACK_TIMEOUT
Browse files Browse the repository at this point in the history
Delete events.rs

Unify import

Move HEARTBEAT_ACK_TIMEOUT since its not an OPCODE
  • Loading branch information
bitfl0wer committed Nov 14, 2023
1 parent e852e6d commit 1e0ed31
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/gateway/events.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/gateway/gateway.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use self::event::Events;

use super::*;
use crate::types::{
self, AutoModerationRule, AutoModerationRuleUpdate, Channel, ChannelCreate, ChannelDelete,
Expand Down
3 changes: 1 addition & 2 deletions src/gateway/handle.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use super::event::Events;
use super::*;
use super::{event::Events, *};
use crate::types::{self, Composite};

/// Represents a handle to a Gateway connection. A Gateway connection will create observable
Expand Down
3 changes: 3 additions & 0 deletions src/gateway/heartbeat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ use crate::types;

use super::*;

/// The amount of time we wait for a heartbeat ack before resending our heartbeat in ms
const HEARTBEAT_ACK_TIMEOUT: u64 = 2000;

/// Handles sending heartbeats to the gateway in another thread
#[allow(dead_code)] // FIXME: Remove this, once HeartbeatHandler is used
#[derive(Debug)]
Expand Down
3 changes: 0 additions & 3 deletions src/gateway/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ const GATEWAY_CALL_SYNC: u8 = 13;
/// See [types::LazyRequest]
const GATEWAY_LAZY_REQUEST: u8 = 14;

/// The amount of time we wait for a heartbeat ack before resending our heartbeat in ms
const HEARTBEAT_ACK_TIMEOUT: u64 = 2000;

pub type ObservableObject = dyn Send + Sync + Any;

/// An entity type which is supposed to be updateable via the Gateway. This is implemented for all such types chorus supports, implementing it for your own types is likely a mistake.
Expand Down

0 comments on commit 1e0ed31

Please sign in to comment.