19 lines
No EOL
585 B
TypeScript
19 lines
No EOL
585 B
TypeScript
import { createWriter } from "../../bufferStuff/index";
|
|
import { Endian } from "../../bufferStuff/Endian";
|
|
import { IPacket } from "./IPacket";
|
|
import { IReader } from "../../bufferStuff/readers/IReader";
|
|
import { Packet } from "../enums/Packet";
|
|
|
|
export class PacketKeepAlive implements IPacket {
|
|
public packetId = Packet.KeepAlive;
|
|
private static readonly KeepAliveBuffer:Buffer = createWriter(Endian.BE, 1).writeByte(Packet.KeepAlive).toBuffer();
|
|
|
|
public readData(reader:IReader) {
|
|
reader;
|
|
return this;
|
|
}
|
|
|
|
public writeData() {
|
|
return PacketKeepAlive.KeepAliveBuffer;
|
|
}
|
|
} |