MCPcopy Create free account
hub / github.com/Tencent/phxqueue / DecodeAddr

Function DecodeAddr

phxqueue/comm/utils/addr_util.cpp:39–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39void DecodeAddr(const uint64_t encoded_addr, proto::Addr &addr) {
40 in_addr in;
41 in.s_addr = (encoded_addr >> 32);
42
43 addr.set_ip(inet_ntoa(in));
44 addr.set_port((encoded_addr >> 16) & 0xFFFF);
45 addr.set_paxos_port(encoded_addr & 0xFFFF);
46}
47
48string EncodedAddrToIPString(const uint64_t encoded_addr) {
49 proto::Addr addr;

Callers 5

ReloadConsumerConfigMethod · 0.85
UpdateLiveMethod · 0.85
AdjustScaleMethod · 0.85
EncodedAddrToIPStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected