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 example-client.cpp takes 100% server ? #62

Open
ghost opened this issue Aug 24, 2017 · 3 comments
Open

why example-client.cpp takes 100% server ? #62

ghost opened this issue Aug 24, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented Aug 24, 2017

i have compiled example-client.cpp as per readme.
i am not doing anything else on received messages, just doing cout on received messages.
and the server usage is 100%

any idea why is that ?

p.s. this is by far easiest websocket /clientlibrary i have seen.
thanks

@mrexodia
Copy link

mrexodia commented Apr 9, 2020

I encountered the same issue today and it seems to be because recv is being called in a hot loop:

I will investigate and create a PR if I find a fix

@mrexodia
Copy link

mrexodia commented Apr 9, 2020

Just use poll(20) (or higher, depending on your needs)

@Jasonzyt
Copy link

Just use poll(20) (or higher, depending on your needs)

oh,it works,thanks

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

2 participants