MCPcopy Create free account
hub / github.com/apache/brpc / sockaddr2endpoint

Function sockaddr2endpoint

src/butil/endpoint.cpp:645–654  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

643}
644
645int sockaddr2endpoint(struct sockaddr_storage* ss, socklen_t size, EndPoint* point) {
646 if (ss->ss_family == AF_INET) {
647 *point = EndPoint(*(sockaddr_in*)ss);
648 return 0;
649 }
650 if (ExtendedEndPoint::create(ss, size, point)) {
651 return 0;
652 }
653 return -1;
654}
655
656sa_family_t get_endpoint_type(const EndPoint& point) {
657 if (ExtendedEndPoint::is_extended(point)) {

Callers 5

TESTFunction · 0.85
GetServersMethod · 0.85
get_local_sideFunction · 0.85
get_remote_sideFunction · 0.85

Calls 1

EndPointClass · 0.85

Tested by 1

TESTFunction · 0.68