summaryrefslogtreecommitdiff
path: root/node/Peer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/Peer.cpp')
-rw-r--r--node/Peer.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/node/Peer.cpp b/node/Peer.cpp
index 294c02bf..0bff2aae 100644
--- a/node/Peer.cpp
+++ b/node/Peer.cpp
@@ -43,7 +43,6 @@ Peer::Peer(const Identity &myIdentity,const Identity &peerIdentity)
_lastUnicastFrame(0),
_lastMulticastFrame(0),
_lastAnnouncedTo(0),
- _lastSpammed(0),
_vMajor(0),
_vMinor(0),
_vRevision(0),
@@ -147,31 +146,6 @@ void Peer::received(
_lastMulticastFrame = now;
}
-bool Peer::send(const RuntimeEnvironment *RR,const void *data,unsigned int len,uint64_t now)
-{
- Path *bestPath = (Path *)0;
- uint64_t lrMax = 0;
- for(unsigned int p=0,np=_numPaths;p<np;++p) {
- if ((_paths[p].active(now)&&(_paths[p].lastReceived() >= lrMax)) {
- lrMax = _paths[p].lastReceived();
- bestPath = &(_paths[p]);
- }
- }
-
- if (bestPath) {
- bool spam = ((now - _lastSpammed) >= ZT_DESPERATION_SPAM_INTERVAL);
- if (RR->node->putPacket(bestPath->address(),data,len,bestPath->desperation(),spam)) {
- bestPath->sent(now);
- RR->antiRec->logOutgoingZT(data,len);
- if (spam)
- _lastSpammed = now;
- return true;
- }
- }
-
- return false;
-}
-
void Peer::addPath(const Path &newp)
{
unsigned int np = _numPaths;