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

Function EncodeAddr

phxqueue/comm/utils/addr_util.cpp:31–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30
31uint64_t EncodeAddr(const proto::Addr &addr) {
32 uint64_t res = inet_addr(addr.ip().c_str());
33 res = (res << 16) | addr.port();
34 res = (res << 16) | addr.paxos_port();
35 return res;
36
37}
38
39void DecodeAddr(const uint64_t encoded_addr, proto::Addr &addr) {
40 in_addr in;

Callers 15

ProtoGetAddrScaleMethod · 0.85
ProtoAddMethod · 0.85
ProtoGetMethod · 0.85
ProtoGetLockInfoMethod · 0.85
ProtoAcquireLockMethod · 0.85
GetAddrScaleMethod · 0.85
GetStoreIDMethod · 0.85
GetQueueByAddrScaleMethod · 0.85
RebuildMethod · 0.85
GetLockIDByAddrMethod · 0.85
RebuildMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected