refactor: packet x1

This commit is contained in:
pk5ls20
2024-11-12 04:02:19 +08:00
parent e287906a9d
commit 98c65c4923
105 changed files with 2286 additions and 1962 deletions

View File

@@ -0,0 +1,27 @@
import { PacketContext } from "@/core/packet/context/packetContext";
import { NapCatCore } from "@/core";
export class PacketClientSession {
private readonly context: PacketContext;
constructor(core: NapCatCore) {
this.context = new PacketContext(core);
}
init(pid: number, recv: string, send: string): Promise<void> {
return this.context.client.init(pid, recv, send);
}
get available() {
return this.context.client.available;
}
get operation() {
return this.context.operation;
}
// TODO: global message element adapter (?
get msgConverter() {
return this.context.msgConverter;
}
}