import { PolusBuffer } from "../../../../util/polusBuffer" ; import { PacketHandler } from "../../../packet" ; export interface SetStartCounterPacket { SequenceNumber : number ; Time : number ; } export const SetStartCounter = { parse ( packet ) { return { SequenceNumber : packet . readVarInt ( ) , Time : packet . read8 ( ) , } ; } , serialize ( packet ) { var buf = new PolusBuffer ( ) ; buf . writeVarInt ( packet . SequenceNumber ) ; buf . write8 ( packet . Time ) ; return buf ; } , } ;