Commit a943f406 authored by Max Kellermann's avatar Max Kellermann

event/ServerSocket: add AddFD() overload with AllocatedSocketAddress&&

parent ce9f09c6
......@@ -288,6 +288,18 @@ ServerSocket::AddFD(UniqueSocketDescriptor fd)
s.SetFD(std::move(fd));
}
void
ServerSocket::AddFD(UniqueSocketDescriptor fd,
AllocatedSocketAddress &&address) noexcept
{
assert(fd.IsDefined());
assert(!address.IsNull());
assert(address.IsDefined());
OneServerSocket &s = AddAddress(std::move(address));
s.SetFD(std::move(fd));
}
#ifdef HAVE_TCP
inline void
......
......@@ -108,6 +108,9 @@ public:
*/
void AddFD(UniqueSocketDescriptor fd);
void AddFD(UniqueSocketDescriptor fd,
AllocatedSocketAddress &&address) noexcept;
bool IsEmpty() const noexcept {
return sockets.empty();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment