MCPcopy Create free account
hub / github.com/ElementsProject/elements / Hello

Method Hello

src/i2p.cpp:285–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283}
284
285std::unique_ptr<Sock> Session::Hello() const
286{
287 auto sock = CreateSock(m_control_host);
288
289 if (!sock) {
290 throw std::runtime_error("Cannot create socket");
291 }
292
293 if (!ConnectSocketDirectly(m_control_host, *sock, nConnectTimeout, true)) {
294 throw std::runtime_error(strprintf("Cannot connect to %s", m_control_host.ToString()));
295 }
296
297 SendRequestAndGetReply(*sock, "HELLO VERSION MIN=3.1 MAX=3.1");
298
299 return sock;
300}
301
302void Session::CheckControlSock()
303{

Callers

nothing calls this directly

Calls 2

ConnectSocketDirectlyFunction · 0.85
ToStringMethod · 0.45

Tested by

no test coverage detected