mpd/src/net/IPv4Address.cxx

14 lines
305 B
C++
Raw Normal View History

// SPDX-License-Identifier: BSD-2-Clause
// author: Max Kellermann <max.kellermann@gmail.com>
2017-08-11 08:41:58 +02:00
#include "IPv4Address.hxx"
#include <cassert>
2017-08-11 08:41:58 +02:00
2020-11-30 21:35:43 +01:00
IPv4Address::IPv4Address(SocketAddress src) noexcept
:address(src.CastTo<struct sockaddr_in>())
2017-08-11 08:41:58 +02:00
{
2020-11-30 21:35:43 +01:00
assert(!src.IsNull());
assert(src.GetFamily() == AF_INET);
2017-08-11 08:41:58 +02:00
}