-
Notifications
You must be signed in to change notification settings - Fork 253
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
Are websockets blocked? #273
Comments
For mode ONION_ONE only one connection can be opened. Try with O_THREADED
or O_DETACH_LISTEN at onion_new.
…On Fri, 23 Oct 2020 at 15:23, Edward Emelianov ***@***.***> wrote:
I try to work with websockets but found that if one websocket is opened, I
can't open another (in another tab, another browser or any other PC).
How can I fix this bug for opening websockets to given port in any
quantity?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#273>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACOZOWY2PNQURK2RREXLS3SMF7ULANCNFSM4S4RXZNA>
.
--
David Moreno Montero
[email protected]
+34 658 18 77 17
[image: Coralbits.com] <http://www.coralbits.com/>
http://www.coralbits.com
|
I run it with O_THREADED:
But when one websocket is opened, no other connections could be done. And this function don't run:
|
I have tried an websocket example from libonion. And it don't work too! As only I open one connection, I can't open another. |
Hi,
sorry to hear.
Websockets support was not fully developed and suffer from problems. It
should work with several threads, but it blocks the threads. A full rewrite
of websockets would be needed, as more testing, but currently I have no
time to do it, and it does not look like i will have it.
I would not recommend onion for a websocket application. Only for very
small apps.
As always everybody is welcome to help, and patches are more than welcome.
Regards,
David.
…On Tue, 27 Oct 2020 at 09:43, Edward Emelianov ***@***.***> wrote:
I have tried an websocket example from libonion. And it don't work too! As
only I open one connection, I can't open another.
What's the right way to work with websockets in libonion? I need at least
10-20 simultaneous connections.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#273 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACOZOSHLYN3QN5RACQ3BV3SM2B4JANCNFSM4S4RXZNA>
.
--
David Moreno Montero
[email protected]
+34 658 18 77 17
[image: Coralbits.com] <http://www.coralbits.com/>
http://www.coralbits.com
|
websockets.c.txt I've attached my adaption of the websocket example for multiple clients. It uses and then pushs periodical test strings data to clients. Edit: Upload better version. |
I found a problem: websockets didn't work for several clients due to gentoo's ebuild of libonion. When I use onion from git, it works, but with segfaults when client transmit some data. |
I try to work with websockets but found that if one websocket is opened, I can't open another (in another tab, another browser or any other PC).
How can I fix this bug for opening websockets to given port in any quantity?
The text was updated successfully, but these errors were encountered: