MCPcopy Create free account
hub / github.com/LUX-Core/lux / CloseSocketDisconnect

Method CloseSocketDisconnect

src/net.cpp:505–517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

503}
504
505void CNode::CloseSocketDisconnect()
506{
507 fDisconnect = true;
508 if (hSocket != INVALID_SOCKET) {
509 LogPrint("net", "disconnecting peer=%d\n", id);
510 CloseSocket(hSocket);
511 }
512
513 // in case this fails, we'll empty the recv buffer when the CNode is deleted
514 TRY_LOCK(cs_vRecvMsg, lockRecv);
515 if (lockRecv)
516 vRecvMsg.clear();
517}
518
519void CNode::PushVersion()
520{

Callers 8

disconnectnodeFunction · 0.80
SocketSendDataFunction · 0.80
ThreadSocketHandlerFunction · 0.80
limit_peersFunction · 0.80
ThreadMessageHandlerFunction · 0.80
SetNetworkActiveFunction · 0.80

Calls 3

LogPrintFunction · 0.85
CloseSocketFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected