'init'
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user