mirror of
https://github.com/nestriness/cdc-file-transfer.git
synced 2026-02-07 01:55: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:
@@ -50,11 +50,7 @@ class ServerSocket : public Socket {
|
||||
size_t* bytes_received) override;
|
||||
|
||||
private:
|
||||
// Listening socket file descriptor (where new connections are accepted).
|
||||
int listen_sockfd_;
|
||||
|
||||
// Connection socket file descriptor (where data is sent to/received from).
|
||||
int conn_sockfd_;
|
||||
std::unique_ptr<struct ServerSocketInfo> socket_info_;
|
||||
};
|
||||
|
||||
} // namespace cdc_ft
|
||||
|
||||
Reference in New Issue
Block a user