MCPcopy Create free account
hub / github.com/catboost/catboost / TEndpoint

Method TEndpoint

util/network/endpoint.cpp:4–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include "sock.h"
3
4TEndpoint::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
14TEndpoint::TEndpoint()
15 : Addr_(new NAddr::TIPv4Addr(TIpAddress(TIpHost(0), TIpPort(0))))

Callers

nothing calls this directly

Calls 2

TIpAddressClass · 0.70
AddrMethod · 0.45

Tested by

no test coverage detected