| 2 | #include "sock.h" |
| 3 | |
| 4 | TEndpoint::TEndpoint(const TEndpoint::TAddrRef& addr) |
| 5 | : Addr_(addr) |
| 6 | { |
| 7 | const sockaddr* sa = Addr_->Addr(); |
| 8 | |
| 9 | if (sa->sa_family != AF_INET && sa->sa_family != AF_INET6 && sa->sa_family != AF_UNIX) { |
| 10 | ythrow yexception() << TStringBuf("endpoint can contain only ipv4, ipv6 or unix address"); |
| 11 | } |
| 12 | } |
| 13 | |
| 14 | TEndpoint::TEndpoint() |
| 15 | : Addr_(new NAddr::TIPv4Addr(TIpAddress(TIpHost(0), TIpPort(0)))) |
nothing calls this directly
no test coverage detected