Skip to content Skip to sidebar Skip to footer

Delay When Receiving Udp Packets In Python In Real-time

I am using Opentrack to track head movements and the coordinates are sent through UDP to my Python program. The program works in the sense that it receives the coordinates correctl

Solution 1:

So I solved it by adding the line

self.s.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 1)

in my code. This sets the buffer to size 1 which solved my problem.

Post a Comment for "Delay When Receiving Udp Packets In Python In Real-time"