This commit is contained in:
2025-09-03 19:18:44 +01:00
parent eb620087c9
commit 695964a636
29 changed files with 631 additions and 571 deletions

View File

@@ -1,16 +1,16 @@
import { MessageTypes } from '../common'
import { numberToUint16BE } from '../utilities/number'
import { packOutgoingPacket } from './packet'
import { MessageTypes } from "../common";
import { numberToUint16BE } from "../utilities/number";
import { packOutgoingPacket } from "./packet";
const MESSAGE_TYPE = numberToUint16BE(MessageTypes.Keepalive)
const MESSAGE_TYPE = numberToUint16BE(MessageTypes.Keepalive);
/**
* Create an outgoing keepalive (0x0005) packet.
* @returns An outgoing keepalive (0x0005) packet.
*/
export function packKeepaliveMessage (): Uint8Array {
export function packKeepaliveMessage(): Uint8Array {
return packOutgoingPacket({
messageType: MESSAGE_TYPE,
data: new Uint8Array(0)
})
data: new Uint8Array(0),
});
}