You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Activity
Theldus commentedon Feb 3, 2021
Hello @arshidkv12,
You're welcome, glad you liked it.
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, likepoll(),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.
[-]Why can't use select function?[/-][+]Support for select() function[/+]