Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are we sure we want to hardcode nonblocking mode for sockets? #113

Open
egnima opened this issue Jan 5, 2025 · 0 comments
Open

Are we sure we want to hardcode nonblocking mode for sockets? #113

egnima opened this issue Jan 5, 2025 · 0 comments

Comments

@egnima
Copy link

egnima commented Jan 5, 2025

Although non-blocking network operations are often preferred in gamedev, there are also plenty of times it's easier (and more CPU efficient) to use the operating systems designated blocking receive mode instead of while looping on a receive, especially if it's in a designated child thread.

I've started working on a PR that would add SetSocketBlockingMode and GetSocketBlockingMode (with nonblocking mode still the default), but I wasn't sure if that's the direction this library is going in. What do you experienced SDLers think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant