Creates a Heartbeat instance. Will send heartbeats to the server list shortly after initialization.
If the heartbeat ever had a successful ping. postHeartbeat sets it.
StaticheartbeatThe rate at which to post a heartbeat, in milliseconds.
StaticheartbeatHow long in milliseconds until the heartbeat request times out.
Static InternalobviouslyQuite notably! This is... still very tailored to ClassiCube... There's this funny issue explaining why it is. Don't build on me, kids! https://github.com/BunnyNabbit/classicborne/issues/33
This class property is expected to be removed. Actually, maybe the whole heartbeat classes as they are...
By default, I am 400, 403 and 429. If triggered, postHeartbeat will sleep for rateLimitedDelay.
StaticrateThe delay in milliseconds when bad statuses are received.
This does not usually happen, if ever. But let's not purposefully retry requests at the rate of retryRate...
StaticretryThe rate at which to retry posting a heartbeat in case of failure, in milliseconds.
This is at a lower rate in order to keep my spot at the server list if the server for the server list is having issues. But actually, it tends to be the CDN of the server for the server list that has issues.
Sends a heartbeat to the server list with the provided form.
Starts the heartbeat loop, calling postHeartbeat on an interval based on heartbeatRate.
I send periodic heartbeats to a server list to announce the presence and status of the universe.