UDS/TCP options

Summary:
Provide an option to enable/disable TCP connections on flipper-server.

The only change at this stage is that Flipper Desktop will use UDS to connect to flipper-server.

Reviewed By: passy

Differential Revision: D37519656

fbshipit-source-id: 3d02084666fde532ec76134edf8cf6a231060a48
This commit is contained in:
Lorenzo Blasa
2022-06-29 15:01:05 -07:00
committed by Facebook GitHub Bot
parent f46cf2b0ce
commit 646b9d5a5d
9 changed files with 110 additions and 35 deletions

View File

@@ -64,6 +64,11 @@ const argv = yargs
type: 'boolean',
default: true,
},
tcp: {
describe: 'Enable TCP connections on flipper-server.',
type: 'boolean',
default: true,
},
channel: {
description: 'Release channel for the build',
choices: ['stable', 'insiders'],
@@ -131,7 +136,7 @@ let startCount = 0;
async function restartServer() {
try {
await compileServerMain(true);
await launchServer(true, argv.open && ++startCount === 1); // only open on the first time
await launchServer(true, argv.open && ++startCount === 1, argv.tcp); // only open on the first time
} catch (e) {
console.error(
chalk.red(