Replies: 2 comments 1 reply
-
You can't use sleep_for, in this case you could set up a timer that runs every 30 milliseconds instead of the while loop. You need some way to handle connection aborts as well. (use us_create_timer, us_timer_set, us_timer_ext to pass through arguments, and us_timer_close on res->onAborted). Ideally you'd also handle res->write's return value (if it returns false, stop sending more data, otherwise you're creating a ton of backpressure) |
Beta Was this translation helpful? Give feedback.
-
I tried to figure out, but I can not improve my code. Could you spend time to check please? I am mostly working in C#, recently I need to work with C/C++ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to read my camera and public it.
I use opencv and uSW::App .
So I tried this way. It worked. But I got blocked other url eg: _app->get("/about ", ...) { }
Could someone can share the way to do?
snip code:
`
uWS::App *_app;
`
Beta Was this translation helpful? Give feedback.
All reactions