Browse Source

small rename

cl-refactor
subtly 10 years ago
parent
commit
78467d3ae0
  1. 4
      libp2p/Session.cpp
  2. 2
      libp2p/Session.h

4
libp2p/Session.cpp

@ -155,7 +155,7 @@ void Session::serviceNodesRequest()
addNote("peers", "done"); addNote("peers", "done");
} }
bool Session::frameReceived(uint16_t _capId, PacketType _t, RLP const& _r) bool Session::readPacket(uint16_t _capId, PacketType _t, RLP const& _r)
{ {
m_lastReceived = chrono::steady_clock::now(); m_lastReceived = chrono::steady_clock::now();
clog(NetRight) << _t << _r; clog(NetRight) << _t << _r;
@ -466,7 +466,7 @@ void Session::doRead()
{ {
auto packetType = (PacketType)RLP(frame.cropped(0, 1)).toInt<unsigned>(); auto packetType = (PacketType)RLP(frame.cropped(0, 1)).toInt<unsigned>();
RLP r(frame.cropped(1)); RLP r(frame.cropped(1));
if (!frameReceived(header.protocolId, packetType, r)) if (!readPacket(header.protocolId, packetType, r))
clog(NetWarn) << "Couldn't interpret packet." << RLP(r); clog(NetWarn) << "Couldn't interpret packet." << RLP(r);
} }
doRead(); doRead();

2
libp2p/Session.h

@ -104,7 +104,7 @@ private:
void write(); void write();
/// Deliver RLPX packet to Session or Capability for interpretation. /// Deliver RLPX packet to Session or Capability for interpretation.
bool frameReceived(uint16_t _capId, PacketType _t, RLP const& _r); bool readPacket(uint16_t _capId, PacketType _t, RLP const& _r);
/// Interpret an incoming Session packet. /// Interpret an incoming Session packet.
bool interpret(PacketType _t, RLP const& _r); bool interpret(PacketType _t, RLP const& _r);

Loading…
Cancel
Save