diff options
author | Max Kellermann <max@musicpd.org> | 2018-08-20 15:53:06 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-08-20 15:57:13 +0200 |
commit | 9cb9154b080aad4d290f1f7f4ef9e682e4567fc2 (patch) | |
tree | 7e7b452620346d3612df09190c8d207d46480ba3 /src/net | |
parent | 234a6193bb9f6ba2d0062606054a9d262eec26bb (diff) |
net/IPv4Address: add struct sockaddr_in constructor
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/IPv4Address.hxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/net/IPv4Address.hxx b/src/net/IPv4Address.hxx index eb604d515..022519270 100644 --- a/src/net/IPv4Address.hxx +++ b/src/net/IPv4Address.hxx @@ -126,11 +126,14 @@ class IPv4Address { public: IPv4Address() = default; + constexpr IPv4Address(const struct sockaddr_in &_address) noexcept + :address(_address) {} + /** * @param port the port number in host byte order */ constexpr IPv4Address(struct in_addr _address, uint16_t port) noexcept - :address(Construct(_address, port)) {} + :IPv4Address(Construct(_address, port)) {} /** * @param port the port number in host byte order |