onion icon indicating copy to clipboard operation
onion copied to clipboard

Question about websockets.c

Open alanswx opened this issue 6 years ago • 1 comments
trafficstars

It seems like the websockets code (when in single threaded mode) sits inside it's own loop and doesn't service any of the other HTTP requests. Is this correct, or did I miss something in how to call the code?

How hard would it be to change it so that it returns to the main poll loop between websocket messages?

alanswx avatar May 24 '19 20:05 alanswx

It is correct.

It should be possible, but the event loop has no support for write epoll, so would block writing. Which is much better than blocking reading and writing.

If you manage to get a patch working, I will be glad to merge it.

Regards, David.

davidmoreno avatar May 24 '19 20:05 davidmoreno