lneuhaus / pyrpl

pyrpl turns your RedPitaya into a powerful DSP device, especially suitable as a lockbox in quantum optics experiments.
http://lneuhaus.github.io/pyrpl/
MIT License
137 stars 107 forks source link

fixed a bug in MonitorClient._writes (redpitaya_client.py) #433

Closed tstolz closed 2 years ago

tstolz commented 3 years ago

causes incomplete array transmission and subsequent timeout errors during socket communication on a Raspberry Pi and potentially other systems as well

tstolz commented 3 years ago

Good point. After looking at this post https://stackoverflow.com/questions/34252273/what-is-the-difference-between-socket-send-and-socket-sendall#:~:text=send%20is%20a%20low%2Dlevel,pass%20or%20throws%20an%20exception. I suppose socket.sendall is the way to go. It's more compact and its only limitation is that you cannot check the amount of sent data in case of an error, which is not required I guess.

lneuhaus commented 3 years ago

I suppose socket.sendall is the way to go.

Sounds good. If you update your PR accordingly, I can merge it right away, otherwise I'll merge my own fix at some point in the future when I've separate the mergeable part from the one that shouldn't go into master.