mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-05 02:39:26 +02:00
feat: use more pipes
This commit is contained in:
parent
86d518fdab
commit
8b78c9c331
18 changed files with 392 additions and 316 deletions
|
@ -67,7 +67,8 @@ export class Adb {
|
|||
): Promise<void> {
|
||||
await this.backend.connect?.();
|
||||
this.packetDispatcher.maxPayloadSize = 0x1000;
|
||||
this.packetDispatcher.calculateChecksum = true;
|
||||
// TODO: Adb: properly set `calculateChecksum`
|
||||
// this.packetDispatcher.calculateChecksum = true;
|
||||
this.packetDispatcher.appendNullToServiceString = true;
|
||||
this.packetDispatcher.start();
|
||||
|
||||
|
@ -224,7 +225,7 @@ export class Adb {
|
|||
return this.packetDispatcher.createSocket(service);
|
||||
}
|
||||
|
||||
public async createSocketAndReadAll(service: string): Promise<string> {
|
||||
public async createSocketAndWait(service: string): Promise<string> {
|
||||
const socket = await this.createSocket(service);
|
||||
let result = '';
|
||||
for await (const chunk of socket.readable) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue