Provide device info directly on server connection

This avoids to retrieve them in a separate step.
This commit is contained in:
Romain Vimont
2021-05-09 16:52:22 +02:00
parent 6a2cd089a1
commit 6adc97198b
6 changed files with 28 additions and 53 deletions

View File

@@ -8,6 +8,7 @@
#include <stdint.h>
#include "adb.h"
#include "coords.h"
#include "scrcpy.h"
#include "util/log.h"
#include "util/net.h"
@@ -58,9 +59,11 @@ bool
server_start(struct server *server, const char *serial,
const struct server_params *params);
#define DEVICE_NAME_FIELD_LENGTH 64
// block until the communication with the server is established
// device_name must point to a buffer of at least DEVICE_NAME_FIELD_LENGTH bytes
bool
server_connect_to(struct server *server);
server_connect_to(struct server *server, char *device_name, struct size *size);
// disconnect and kill the server process
void