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

Why do you favor polling instead of blocking? #34

Open
ovidiugabriel opened this issue May 3, 2018 · 1 comment
Open

Why do you favor polling instead of blocking? #34

ovidiugabriel opened this issue May 3, 2018 · 1 comment

Comments

@ovidiugabriel
Copy link

https://github.com/soywiz/haxe-ws/blob/32b81123e4545742c0907473ad1690518cbf299d/src/haxe/net/WebSocketServer.hx#L29

@ovidiugabriel
Copy link
Author

ovidiugabriel commented May 3, 2018

A blocking socket is the default behavior. Also, for POSIX accept() shall block until a connection is present, this is the default, unless O_NONBLOCK flag is set. https://linux.die.net/man/3/accept

Is there any way to put the WebSocketServer back in blocking mode? I don't see any method to get a reference to _listenSocket member.

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