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

Class SocketMapKey

src/brpc/socket_map.h:49–62  ·  view source on GitHub ↗

The following fields uniquely define a Socket. In other word, Socket can't be shared between 2 different SocketMapKeys

Source from the content-addressed store, hash-verified

47// The following fields uniquely define a Socket. In other word,
48// Socket can't be shared between 2 different SocketMapKeys
49struct SocketMapKey {
50 explicit SocketMapKey(const butil::EndPoint& pt)
51 : peer(pt)
52 {}
53 SocketMapKey(const butil::EndPoint& pt, const ChannelSignature& cs)
54 : peer(pt), channel_signature(cs)
55 {}
56 SocketMapKey(const ServerNode& sn, const ChannelSignature& cs)
57 : peer(sn), channel_signature(cs)
58 {}
59
60 ServerNode peer;
61 ChannelSignature channel_signature;
62};
63
64inline bool operator==(const SocketMapKey& k1, const SocketMapKey& k2) {
65 return k1.peer == k2.peer && k1.channel_signature == k2.channel_signature;

Callers 7

TEST_FFunction · 0.85
TEST_FFunction · 0.85
OnCreatingStreamMethod · 0.85
DestroyStreamUserDataMethod · 0.85
OnStopInternalMethod · 0.85
~ChannelMethod · 0.85
InitSingleMethod · 0.85

Calls

no outgoing calls

Tested by 2

TEST_FFunction · 0.68
TEST_FFunction · 0.68