71 void SocketAddress::
init() {
72 if (sunPath.length() <
sizeof(sockAddr.sun_path)) {
73 const std::size_t len = sunPath.length();
74 std::memcpy(sockAddr.sun_path, sunPath.data(), len);
75 sockAddr.sun_path[len] = 0;
76 sockAddrLen =
static_cast<SockLen>(offsetof(sockaddr_un, sun_path) + len + 1);
78 throw core::socket::SocketAddress::BadSocketAddress(
79 core::socket::STATE_FATAL,
80 "Unix-Domain error sun-path to long: Lenght is = " + std::to_string(sunPath.length()) +
81 ", should be: " + std::to_string(
sizeof(sockAddr.sun_path) - 1),