refactor(adb): let backends deserialize packets by themselves for better optimization

This commit is contained in:
Simon Chan 2022-04-03 12:49:38 +08:00
parent 38a76a2e0c
commit 8a521c8d93
No known key found for this signature in database
GPG key ID: A8B69F750B9BCEDD
11 changed files with 61 additions and 70 deletions

View file

@ -2,13 +2,13 @@
import { AutoDisposable } from '@yume-chan/event';
import Struct from '@yume-chan/struct';
import type { AdbPacket } from '../packet.js';
import type { AdbPacketCore } from '../packet.js';
import type { AdbIncomingSocketEventArgs, AdbPacketDispatcher, AdbSocket } from '../socket/index.js';
import { AdbBufferedStream } from '../stream/index.js';
import { decodeUtf8 } from "../utils/index.js";
export interface AdbReverseHandler {
onSocket(packet: AdbPacket, socket: AdbSocket): void;
onSocket(packet: AdbPacketCore, socket: AdbSocket): void;
}
export interface AdbForwardListener {