net/UniqueSocketDescriptor: add UniqueFileDescriptor constructor
This commit is contained in:
parent
75eb2c257c
commit
f535ccf9bf
|
@ -26,7 +26,11 @@ public:
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
explicit UniqueSocketDescriptor(FileDescriptor _fd) noexcept
|
explicit UniqueSocketDescriptor(FileDescriptor _fd) noexcept
|
||||||
:SocketDescriptor(_fd) {}
|
:SocketDescriptor(_fd) {}
|
||||||
|
|
||||||
|
explicit UniqueSocketDescriptor(UniqueFileDescriptor &&_fd) noexcept
|
||||||
|
:SocketDescriptor(_fd.Release()) {}
|
||||||
#endif // !_WIN32
|
#endif // !_WIN32
|
||||||
|
|
||||||
explicit UniqueSocketDescriptor(int _fd) noexcept
|
explicit UniqueSocketDescriptor(int _fd) noexcept
|
||||||
:SocketDescriptor(_fd) {}
|
:SocketDescriptor(_fd) {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue