diff --git a/src/event/ServerSocket.cxx b/src/event/ServerSocket.cxx index 3457465c9..10d7aef2f 100644 --- a/src/event/ServerSocket.cxx +++ b/src/event/ServerSocket.cxx @@ -52,7 +52,7 @@ #include #endif -class OneServerSocket final : private SocketMonitor { +class ServerSocket::OneServerSocket final : private SocketMonitor { ServerSocket &parent; const unsigned serial; @@ -146,7 +146,7 @@ get_remote_uid(int fd) } inline void -OneServerSocket::Accept() noexcept +ServerSocket::OneServerSocket::Accept() noexcept { StaticSocketAddress peer_address; UniqueSocketDescriptor peer_fd(GetSocket().AcceptNonBlock(peer_address)); @@ -170,14 +170,14 @@ OneServerSocket::Accept() noexcept } bool -OneServerSocket::OnSocketReady(gcc_unused unsigned flags) noexcept +ServerSocket::OneServerSocket::OnSocketReady(gcc_unused unsigned flags) noexcept { Accept(); return true; } inline void -OneServerSocket::Open() +ServerSocket::OneServerSocket::Open() { assert(!IsDefined()); @@ -272,7 +272,7 @@ ServerSocket::Close() noexcept i.Close(); } -OneServerSocket & +ServerSocket::OneServerSocket & ServerSocket::AddAddress(SocketAddress address) noexcept { sockets.emplace_back(loop, *this, next_serial, @@ -281,7 +281,7 @@ ServerSocket::AddAddress(SocketAddress address) noexcept return sockets.back(); } -OneServerSocket & +ServerSocket::OneServerSocket & ServerSocket::AddAddress(AllocatedSocketAddress &&address) noexcept { sockets.emplace_back(loop, *this, next_serial, diff --git a/src/event/ServerSocket.hxx b/src/event/ServerSocket.hxx index 8390e1859..8d8c2aaee 100644 --- a/src/event/ServerSocket.hxx +++ b/src/event/ServerSocket.hxx @@ -27,13 +27,12 @@ class AllocatedSocketAddress; class UniqueSocketDescriptor; class EventLoop; class AllocatedPath; -class OneServerSocket; /** * A socket that accepts incoming stream connections (e.g. TCP). */ class ServerSocket { - friend class OneServerSocket; + class OneServerSocket; EventLoop &loop;