Problem with sockets and SDL
The call to recv blocks until data is available. If you call recv on the same thread that does the rendering, your screen will not be updated.
To solve this, you can either use non-blocking I/O (Google has quite some arctiles on that), or run your network and rendering code in separate threads.
To solve this, you can either use non-blocking I/O (Google has quite some arctiles on that), or run your network and rendering code in separate threads.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement