Files
desktop/app/providers/ProtocolProvider/protocol/packets/packet.kernelupdate.ts
rosetta 83f38dc63f 'init'
2026-01-30 05:01:05 +02:00

43 lines
915 B
TypeScript

import Packet from "../packet";
import Stream from "../stream";
export class PacketKernelUpdate extends Packet {
private url: string = "";
private version: string = "";
public getPacketId(): number {
return 0x0D;
}
public _receive(stream: Stream): void {
this.url = stream.readString();
this.version = stream.readString();
}
public _send(): Promise<Stream> | Stream {
let stream = new Stream();
stream.writeInt16(this.getPacketId());
stream.writeString(this.url);
stream.writeString(this.version);
return stream;
}
public getUrl(): string {
return this.url;
}
public setUrl(url: string): void {
this.url = url;
}
public getVersion(): string {
return this.version;
}
public setVersion(version: string): void {
this.version = version;
}
}