early-access version 2969

This commit is contained in:
pineappleEA
2022-09-23 20:14:56 +02:00
parent 2d12f7fb50
commit 54a6248e07
8 changed files with 32 additions and 35 deletions

View File

@@ -32,6 +32,10 @@ public:
std::unique_ptr<SocketBase> socket;
SockAddrIn sockaddr_in;
};
SocketBase() = default;
explicit SocketBase(SOCKET fd_) : fd{fd_} {}
virtual ~SocketBase() = default;
virtual SocketBase& operator=(const SocketBase&) = delete;
@@ -89,12 +93,19 @@ public:
virtual void HandleProxyPacket(const ProxyPacket& packet) = 0;
[[nodiscard]] SOCKET GetFD() const {
return fd;
}
protected:
SOCKET fd = INVALID_SOCKET;
};
class Socket : public SocketBase {
public:
Socket() = default;
explicit Socket(SOCKET fd_) : SocketBase{fd_} {}
~Socket() override;
Socket(const Socket&) = delete;