MCPcopy Create free account
hub / github.com/HumbleNet/HumbleNet / sendHello

Function sendHello

tests/test_peer.cpp:112–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112bool sendHello(PeerId peer, bool isResponse = false)
113{
114 std::cout << "Try hello " << peer << std::endl;
115
116 flatbuffers::FlatBufferBuilder builder;
117 auto hello = TestClient::CreateHelloPeer(builder, buildKnownPeers(builder), isResponse);
118 auto msg = TestClient::CreateMessage(builder, TestClient::MessageSwitch_HelloPeer, hello.Union());
119 builder.Finish(msg);
120
121 return sendMessage(peer, builder) >= 0;
122}
123
124
125void processMessage(PeerId peer, const char* buff, size_t length)

Callers 3

processMessageFunction · 0.85
main_loopFunction · 0.85
RunMethod · 0.85

Calls 4

buildKnownPeersFunction · 0.85
sendMessageFunction · 0.85
UnionMethod · 0.80
FinishMethod · 0.80

Tested by

no test coverage detected