net/ServerSocket: pass UniqueSocketDescriptor&& to OnAccept()

This commit is contained in:
Max Kellermann
2017-08-10 19:13:18 +02:00
parent 492b20a89d
commit 9a5bcc6db0
9 changed files with 35 additions and 28 deletions

View File

@@ -38,6 +38,7 @@
#include <stddef.h>
class SocketAddress;
class UniqueSocketDescriptor;
class EventLoop;
class Path;
struct Instance;
@@ -94,7 +95,7 @@ public:
std::list<ClientMessage> messages;
Client(EventLoop &loop, Partition &partition,
SocketDescriptor fd, int uid, int num);
UniqueSocketDescriptor &&fd, int uid, int num);
~Client() {
if (FullyBufferedSocket::IsDefined())
@@ -236,7 +237,7 @@ client_manager_init();
void
client_new(EventLoop &loop, Partition &partition,
SocketDescriptor fd, SocketAddress address, int uid);
UniqueSocketDescriptor &&fd, SocketAddress address, int uid);
/**
* Write a printf-like formatted string to the client.