summary refs log tree commit diff
path: root/gateway/src/opcodes/Heartbeat.ts
blob: 42b72d4b7c7364c3ccbc5496722cebcaad44a26b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
import { Payload, WebSocket } from "@fosscord/gateway";
import { setHeartbeat } from "../util/Heartbeat";
import { Send } from "../util/Send";

export async function onHeartbeat(this: WebSocket, _data: Payload) {
	// TODO: validate payload

	setHeartbeat(this);

	await Send(this, { op: 11 });
}