mirror of
https://github.com/nestriness/cdc-file-transfer.git
synced 2026-01-30 12:25:35 +02:00
[cdc_rsync] Add support for ServerSocket on Windows (#48)
Makes ServerSocket multi-platform, mainly by working around some small API differences. The code is largely the same, there should be no differences on Linux. Also moves WSAStartup() and WSACleanup() up to the Socket level as static methods because it's used by both ClientSocket and ServerSocket, and because it doesn't make sense to do that in the socket class as that would prevent one from using several sockets.
This commit is contained in:
@@ -32,6 +32,7 @@ namespace cdc_ft {
|
||||
|
||||
class MessagePump;
|
||||
class ServerSocket;
|
||||
class SocketFinalizer;
|
||||
|
||||
class CdcRsyncServer {
|
||||
public:
|
||||
@@ -90,6 +91,8 @@ class CdcRsyncServer {
|
||||
// Used to toggle decompression.
|
||||
void Thread_OnPackageReceived(PacketType type);
|
||||
|
||||
// The order determines the correct destruction order, so keep it!
|
||||
std::unique_ptr<SocketFinalizer> socket_finalizer_;
|
||||
std::unique_ptr<ServerSocket> socket_;
|
||||
std::unique_ptr<MessagePump> message_pump_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user