Maybe I designed my UDP listener thread the wrong way, but here goes.
I've made a thread for the client side that listens for incoming data from the server. Quite logical. It occured to me that the UDP socket must be set to blocking, or it misses a ton of packets. It's fine leaving the socket as blocking in the dedicated thread for as long as it's running, but when I need to close the thread while the socket is blocking I don't really know any way of unblocking it while the SocketUDP::Receive method is running.
I'm using a bool for a loop in the Run method of the thread to shut it down safely. Am I forced to kill the thread with Terminate()?
It seems like the TCP socket can be in a non-blocking state and still receive all packets. Is this true?[/b]