SFML community forums

Help => Network => Topic started by: FleshyOverlord on January 28, 2020, 12:00:40 am

Title: Blocking and locking the UDP receive function
Post by: FleshyOverlord on January 28, 2020, 12:00:40 am
Background: My program has two threads, the UDP receive function and the main game logic thread.

Is it safe to set a UDP socket to blocking and not lock the UDP receive thread when the socket.receive()function is called? I am worried that if I call a socket.send(packet, ip, port)function when the UDP socket is receiving it will interfere with socket. I was worried this is what might have been causing my program to lock up.