Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Util/Network.py
diff options
context:
space:
mode:
authoramartin <olpc@xo-02-2E-11.localdomain>2007-06-19 07:01:56 (GMT)
committer amartin <olpc@xo-02-2E-11.localdomain>2007-06-19 07:01:56 (GMT)
commit18744b5a064b14091cdf123a4ade502b731021a6 (patch)
tree57b1ecd44ad907dabe7746c0cf0680df88b46627 /Util/Network.py
parent623b8d9d78f887225bfcf0214c9a2c8a8924c551 (diff)
network
Diffstat (limited to 'Util/Network.py')
-rw-r--r--Util/Network.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Util/Network.py b/Util/Network.py
index 00e641b..f90ea6f 100644
--- a/Util/Network.py
+++ b/Util/Network.py
@@ -472,10 +472,13 @@ class Network:
self.send( HT_LATENCY_REPLY, data, sock )
def processPR_SYNC_QUERY( self, sock, data ):
- self.packer.pack_float(0.11)
+ self.packer.pack_float(self.nextHeartbeat())
self.send( HT_SYNC_REPLY, data + self.packer.get_buffer(), sock )
self.packer.reset()
+ def registerHeartbeat( self, handler ):
+ self.nextHeartbeat = handler
+
#-- PEER handlers ------------------------------------------------------
def processHT_LATENCY_REPLY( self, sock, data ):
t = time.time()