mirror of
https://github.com/nestriness/cdc-file-transfer.git
synced 2026-01-30 14:35:37 +02:00
[cdc_rsync] Add initial support for Windows (#51)
Adds a ServerArch class whose job it is to encapsulate differences between Windows and Linux cdc_rsync_servers. It detects the type based on a heuristic in the destination path. This is not fool proof and will probably require further work, like falling back to the other type if the detected one doesn't work. Uses the ServerArch class to determine the different commands to start the server and to deploy the server. Note that the functionality is not well tested on Windows yet, but copying plain files works.
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
namespace cdc_ft {
|
||||
|
||||
class Process;
|
||||
class ServerArch;
|
||||
class ZstdStream;
|
||||
|
||||
class CdcRsyncClient {
|
||||
@@ -71,9 +72,12 @@ class CdcRsyncClient {
|
||||
absl::Status Run();
|
||||
|
||||
private:
|
||||
// Finds available local and remote ports for port forwarding.
|
||||
absl::StatusOr<int> FindAvailablePort();
|
||||
|
||||
// Starts the server process. If the method returns a status with tag
|
||||
// |kTagDeployServer|, Run() calls DeployServer() and tries again.
|
||||
absl::Status StartServer();
|
||||
absl::Status StartServer(int port, const ServerArch& arch);
|
||||
|
||||
// Stops the server process.
|
||||
absl::Status StopServer();
|
||||
@@ -85,7 +89,7 @@ class CdcRsyncClient {
|
||||
absl::Status Sync();
|
||||
|
||||
// Copies all gamelet components to the gamelet.
|
||||
absl::Status DeployServer();
|
||||
absl::Status DeployServer(const ServerArch& arch);
|
||||
|
||||
// Sends relevant options to the server.
|
||||
absl::Status SendOptions();
|
||||
|
||||
Reference in New Issue
Block a user