mirror of
https://github.com/nestriness/cdc-file-transfer.git
synced 2026-01-30 12:25:35 +02:00
[cdc_rsync] Enable local syncing (#75)
Adds support for local syncs of files and folders on the same Windows machine, e.g. cdc_rsync C:\source C:\dest. The two main changes are - Skip the check whether the port is available remotely with PortManager. - Do not deploy cdc_rsync_server. - Run cdc_rsync_server directly, not through an SSH tunnel. The current implementation is not optimal as it starts cdc_rsync_server as a separate process and communicates to it via a TCP port.
This commit is contained in:
@@ -21,16 +21,18 @@
|
||||
#include <vector>
|
||||
|
||||
#include "absl/status/status.h"
|
||||
#include "absl/status/statusor.h"
|
||||
#include "cdc_rsync/base/message_pump.h"
|
||||
#include "cdc_rsync/client_socket.h"
|
||||
#include "cdc_rsync/progress_tracker.h"
|
||||
#include "common/path_filter.h"
|
||||
#include "common/port_manager.h"
|
||||
#include "common/remote_util.h"
|
||||
#include "common/process.h"
|
||||
|
||||
namespace cdc_ft {
|
||||
|
||||
class PortManager;
|
||||
class Process;
|
||||
class RemoteUtil;
|
||||
class ServerArch;
|
||||
class ZstdStream;
|
||||
|
||||
@@ -129,8 +131,8 @@ class CdcRsyncClient {
|
||||
std::vector<std::string> sources_;
|
||||
const std::string destination_;
|
||||
WinProcessFactory process_factory_;
|
||||
RemoteUtil remote_util_;
|
||||
PortManager port_manager_;
|
||||
std::unique_ptr<RemoteUtil> remote_util_;
|
||||
std::unique_ptr<PortManager> port_manager_;
|
||||
std::unique_ptr<SocketFinalizer> socket_finalizer_;
|
||||
ClientSocket socket_;
|
||||
MessagePump message_pump_{&socket_, MessagePump::PacketReceivedDelegate()};
|
||||
|
||||
Reference in New Issue
Block a user