|
|
@ -36,13 +36,10 @@ public:
|
|
|
|
|
|
|
|
|
|
|
|
SocketBase() = default;
|
|
|
|
SocketBase() = default;
|
|
|
|
explicit SocketBase(SOCKET fd_) : fd{fd_} {}
|
|
|
|
explicit SocketBase(SOCKET fd_) : fd{fd_} {}
|
|
|
|
|
|
|
|
|
|
|
|
virtual ~SocketBase() = default;
|
|
|
|
virtual ~SocketBase() = default;
|
|
|
|
|
|
|
|
|
|
|
|
virtual SocketBase& operator=(const SocketBase&) = delete;
|
|
|
|
YUZU_NON_COPYABLE(SocketBase);
|
|
|
|
|
|
|
|
YUZU_NON_MOVEABLE(SocketBase);
|
|
|
|
// Avoid closing sockets implicitly
|
|
|
|
|
|
|
|
virtual SocketBase& operator=(SocketBase&&) noexcept = delete;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual Errno Initialize(Domain domain, Type type, Protocol protocol) = 0;
|
|
|
|
virtual Errno Initialize(Domain domain, Type type, Protocol protocol) = 0;
|
|
|
|
|
|
|
|
|
|
|
@ -109,14 +106,8 @@ public:
|
|
|
|
|
|
|
|
|
|
|
|
~Socket() override;
|
|
|
|
~Socket() override;
|
|
|
|
|
|
|
|
|
|
|
|
Socket(const Socket&) = delete;
|
|
|
|
|
|
|
|
Socket& operator=(const Socket&) = delete;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Socket(Socket&& rhs) noexcept;
|
|
|
|
Socket(Socket&& rhs) noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
// Avoid closing sockets implicitly
|
|
|
|
|
|
|
|
Socket& operator=(Socket&&) noexcept = delete;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Errno Initialize(Domain domain, Type type, Protocol protocol) override;
|
|
|
|
Errno Initialize(Domain domain, Type type, Protocol protocol) override;
|
|
|
|
|
|
|
|
|
|
|
|
Errno Close() override;
|
|
|
|
Errno Close() override;
|
|
|
|