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

Support for select() function #15

Open
arshidkv12 opened this issue Feb 2, 2021 · 1 comment
Open

Support for select() function #15

arshidkv12 opened this issue Feb 2, 2021 · 1 comment

Comments

@arshidkv12
Copy link

arshidkv12 commented Feb 2, 2021

Thank you for your good library.
I think it is more helpful if you add a select function internally.

@Theldus
Copy link
Owner

Theldus commented Feb 3, 2021

Hello @arshidkv12,

Thank you for your good library.

You're welcome, glad you liked it.

think it is more helpful if you add a select function internally.

Me too =). The wsServer grew from a very toy project to what is found today, there are many improvements concerning the implementation of the protocol, but something I haven't touched yet is about the client management.

As you have seen, wsServer uses threads to manage client messages, and a better approach would be the use of select() (and its siblings, like poll(), epoll()). Since I didn't expect wsServer to be used to handle a large number of clients, I have kept the thread implementation to date.

That said, adding support for this is definitely on my plans, but it is not on my priorities right now. Any contributions in this regard are welcome.

@Theldus Theldus changed the title Why can't use select function? Support for select() function May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants