DiscordEngineHeartbeatable

public protocol DiscordEngineHeartbeatable

Declares that a type will send heartbeats to a Discord gateway.

  • The number of milliseconds between heartbeats.

    Declaration

    Swift

    var heartbeatInterval: Int
  • The DispatchQueue that the heartbeats are sent on.

    Declaration

    Swift

    var heartbeatQueue: DispatchQueue
  • Starts sending heartbeats. After calling this heartbeating should be automatic.

    Declaration

    Swift

    func startHeartbeat(milliseconds: Int)

    Parameters

    milliseconds

    The number of milliseconds between heartbeats

  • Sends a heartbeat to the gateway. This should be called from a timer/dispatch.after.

    Declaration

    Swift

    func sendHeartbeat()