@u4/adbkit
Version:
A Typescript client for the Android Debug Bridge.
16 lines • 473 B
JavaScript
import Command from '../../command.js';
const RE_OK = /restarting in/;
export default class TcpIpCommand extends Command {
async execute(port) {
await this._send(`tcpip:${port}`);
await this.readOKAY();
const value = await this.parser.readAll();
if (RE_OK.test(value.toString())) {
return port;
}
else {
throw new Error(value.toString().trim());
}
}
}
//# sourceMappingURL=tcpip.js.map