diff --git a/src/net/SocketDescriptor.hxx b/src/net/SocketDescriptor.hxx index 49ec6c7..1b2f0c0 100644 --- a/src/net/SocketDescriptor.hxx +++ b/src/net/SocketDescriptor.hxx @@ -24,6 +24,7 @@ class SocketAddress; class StaticSocketAddress; class IPv4Address; class IPv6Address; +class UniqueSocketDescriptor; /** * An OO wrapper for a Berkeley or WinSock socket descriptor. @@ -137,7 +138,10 @@ public: using FileDescriptor::SetNonBlocking; using FileDescriptor::SetBlocking; - using FileDescriptor::Duplicate; + + [[nodiscard]] + UniqueSocketDescriptor Duplicate() const noexcept; + using FileDescriptor::CheckDuplicate; using FileDescriptor::Close; #else diff --git a/src/net/meson.build b/src/net/meson.build index f1b5076..05c72f8 100644 --- a/src/net/meson.build +++ b/src/net/meson.build @@ -1,5 +1,6 @@ net_dep = declare_dependency( dependencies: [ system_dep, + io_dep, ], )