event/ServerSocket, config/Net: abstract socket support

This commit is contained in:
Max Kellermann
2019-02-25 13:01:42 +01:00
parent f10afd38b5
commit 44422b2b2f
5 changed files with 39 additions and 0 deletions

View File

@@ -396,3 +396,19 @@ ServerSocket::AddPath(AllocatedPath &&path)
#endif /* !HAVE_UN */
}
#ifdef __linux__
void
ServerSocket::AddAbstract(const char *name)
{
assert(name != nullptr);
assert(*name == '@');
AllocatedSocketAddress address;
address.SetLocal(name);
AddAddress(std::move(address));
}
#endif