Skip to content

Commit

Permalink
net/UniqueSocketDescriptor: add UniqueFileDescriptor constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Aug 30, 2024
1 parent 5e02e4d commit 3bbff69
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/net/UniqueSocketDescriptor.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ public:
#ifndef _WIN32
explicit UniqueSocketDescriptor(FileDescriptor _fd) noexcept
:SocketDescriptor(_fd) {}

explicit UniqueSocketDescriptor(UniqueFileDescriptor &&_fd) noexcept
:SocketDescriptor(_fd.Release()) {}
#endif // !_WIN32

explicit UniqueSocketDescriptor(int _fd) noexcept
:SocketDescriptor(_fd) {}

Expand Down

0 comments on commit 3bbff69

Please sign in to comment.