Kaynağa Gözat

app: echo.py show usage of link-local ipv6

jkds 7 ay önce
ebeveyn
işleme
5bc736b243
1 değiştirilmiş dosya ile 4 ekleme ve 2 silme
  1. 4 2
      bin/app/echo.py

+ 4 - 2
bin/app/echo.py

@@ -5,8 +5,10 @@ from pydrk import serial
 
 context = zmq.Context()
 socket = context.socket(zmq.REQ)
-#self.socket.setsockopt(zmq.IPV6, True)
-socket.connect(f"tcp://127.0.0.1:9484")
+#socket.setsockopt(zmq.IPV6, True)
+# Need to specify network interface for IPv6 link-local addrs
+#socket.connect(f"tcp://[XXX%eth1]:9484")
+socket.connect(f"tcp://[::]:9484")
 
 req_cmd = bytearray()
 serial.write_u8(req_cmd, 0)