Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Blocking and locking the UDP receive function  (Read 339 times)

0 Members and 1 Guest are viewing this topic.


  • Newbie
  • *
  • Posts: 22
    • View Profile
Blocking and locking the UDP receive function
« 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.
« Last Edit: January 28, 2020, 12:07:41 am by FleshyOverlord »