event/ServerSocket: use AllocatedSocketAddress for OneServerSocket::address

Manages memory automatically.
This commit is contained in:
Max Kellermann
2015-07-22 11:05:08 +02:00
parent f084bbbf35
commit fdeec0307e
2 changed files with 16 additions and 9 deletions

View File

@@ -25,6 +25,7 @@
#include <stddef.h>
class SocketAddress;
class AllocatedSocketAddress;
class EventLoop;
class Error;
class AllocatedPath;
@@ -52,6 +53,7 @@ public:
private:
OneServerSocket &AddAddress(SocketAddress address);
OneServerSocket &AddAddress(AllocatedSocketAddress &&address);
/**
* Add a listener on a port on all IPv4 interfaces.