mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-04 18:29:23 +02:00
refactor(stream): move streams to new package
This commit is contained in:
parent
ce8f062e96
commit
6887d8549f
87 changed files with 985 additions and 811 deletions
|
@ -1,11 +1,12 @@
|
|||
// cspell: ignore killforward
|
||||
|
||||
import { AutoDisposable } from '@yume-chan/event';
|
||||
import { BufferedStream, BufferedStreamEndedError } from '@yume-chan/stream-extra';
|
||||
import Struct from '@yume-chan/struct';
|
||||
import type { Adb } from "../adb.js";
|
||||
|
||||
import type { Adb } from '../adb.js';
|
||||
import type { AdbIncomingSocketHandler, AdbSocket } from '../socket/index.js';
|
||||
import { AdbBufferedStream, BufferedStreamEndedError } from '../stream/index.js';
|
||||
import { decodeUtf8 } from "../utils/index.js";
|
||||
import { decodeUtf8 } from '../utils/index.js';
|
||||
|
||||
export interface AdbForwardListener {
|
||||
deviceSerial: string;
|
||||
|
@ -52,7 +53,7 @@ export class AdbReverseCommand extends AutoDisposable {
|
|||
|
||||
private async createBufferedStream(service: string) {
|
||||
const socket = await this.adb.createSocket(service);
|
||||
return new AdbBufferedStream(socket);
|
||||
return new BufferedStream(socket.readable);
|
||||
}
|
||||
|
||||
private async sendRequest(service: string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue