MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / address

Method address

base/poco/Net/src/SocketImpl.cpp:690–703  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

688
689
690SocketAddress SocketImpl::address()
691{
692 if (_sockfd == POCO_INVALID_SOCKET) throw InvalidSocketException();
693
694 sockaddr_storage buffer;
695 struct sockaddr* pSA = reinterpret_cast<struct sockaddr*>(&buffer);
696 poco_socklen_t saLen = sizeof(buffer);
697 int rc = ::getsockname(_sockfd, pSA, &saLen);
698 if (rc == 0)
699 return SocketAddress(pSA, saLen);
700 else
701 error();
702 return SocketAddress();
703}
704
705
706SocketAddress SocketImpl::peerAddress()

Callers 15

forAddressMethod · 0.45
openMethod · 0.45
runMethod · 0.45
threadNameMethod · 0.45
serverAddressMethod · 0.45
TYPED_TESTFunction · 0.45
getUrlMethod · 0.45
getUrlMethod · 0.45

Calls 2

errorFunction · 0.85
SocketAddressClass · 0.50

Tested by 9

TYPED_TESTFunction · 0.36
getUrlMethod · 0.36
getUrlMethod · 0.36
TESTFunction · 0.36
makeConnectedPairFunction · 0.36
TESTFunction · 0.36
getServerUrlMethod · 0.36
connectMethod · 0.36
getUrlMethod · 0.36