Skip to content

Commit

Permalink
Server acknowledgement
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Wallar committed Feb 7, 2016
1 parent 8d99485 commit 0393e29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions launch/server.launch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<launch>
<node pkg="jammi" type="server_node.py" name="jammi_server" output="screen">
<param name="host" value="localhost"/>
<param name="port" value="9000"/>
<param name="host" value="wallar.me"/>
<param name="port" value="8080"/>
</node>

</launch>
2 changes: 2 additions & 0 deletions src/server/ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def onMessage(self, payload, is_binary):
frmt = "%ds" % size[0]
unpacked = struct.unpack('=I' + frmt, decompressed)
msg = json.loads(unpacked[1])
acknowledge = struct.pack('=b', 0)
common.get_client(msg["from"]).sendMessage(acknowledge, True)
latency = Float32()
latency.data = received_time - msg["stamp"]
self.lat_pubs[msg["from"]].publish(latency)
Expand Down

0 comments on commit 0393e29

Please sign in to comment.