Skip to content

Commit bbda197

Browse files
Send empty message on connection start (#58)
1 parent b5dbb10 commit bbda197

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ros_tcp_endpoint/tcp_sender.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ def start_sender(self, conn, halt_event):
9999
def sender_loop(self, conn, tid, halt_event):
100100
s = None
101101
local_queue = Queue()
102+
# send an empty message to confirm connection
103+
# minimal message: 4 zero bytes for topic length 0, 4 zero bytes for payload length 0
104+
local_queue.put(b'\0\0\0\0\0\0\0\0')
102105
with self.queue_lock:
103106
self.queue = local_queue
104107

0 commit comments

Comments
 (0)