Accept port range

Accept a range of ports to listen to, so that it does not fail if
another instance of scrcpy is currently starting.

The range can be passed via the command line:

    scrcpy -p 27183:27186
    scrcpy -p 27183  # implicitly 27183:27183, as before

The default is 27183:27199.

Closes #951 <https://github.com/Genymobile/scrcpy/issues/951>
This commit is contained in:
Romain Vimont
2020-01-18 17:21:00 +01:00
parent 2a3a9d4ea9
commit dc7fcf3c7a
9 changed files with 157 additions and 41 deletions
+5
View File
@@ -27,4 +27,9 @@ struct position {
struct point point;
};
struct port_range {
uint16_t first;
uint16_t last;
};
#endif