Replies: 5 comments 8 replies
-
Hi, If you look at the code, there is indeed a default limit of 4 or 8 depending if running on 8266 or ESP32. ESPAsyncWebServer/src/AsyncWebSocket.h Lines 51 to 55 in 0520641 This feature is there since the original library but was not documented. |
Beta Was this translation helpful? Give feedback.
-
Thank you, The app creates an access point and has a settings page for hostname and WiFi credentials of the WiFi it needs to connect to. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
psychicHttp is also spawning 8 workers of 4k each... This is a hungry
framework and not yet on part with ESPAsyncWebServer.
Tried brotli too with esp-dash but brotli was only working with Safari.
All chromium based browser and Mozilla are keeping brotli only for https
connections.
Reason is explains in a chromium discussion where they explain that there
are a lot of mim proxy (ISP or else) that are doing content filtering,
caching and optimization, which are serving back the resources after
applying a gzip compression and consequently setting the content encoding
to gzip.
So for brotli content that they do not understand, they would gzip over an
already-commpressed content and would overwrite the content-encodoing type
to set it to gzip when it was brotli. So the client is losing the
information that it was compressed with brotli.
That's why they only allow it through https.
Mathieu
Le lun. 10 juin 2024, 18:32, Proddy ***@***.***> a écrit :
… I thought brotli only works on http/2 and HTTP SSL which ESPAsyncWebServer
doesn't support? I did get it working using https and
https://github.com/hoeken/PsychicHTTP a few months ago, but then I
quickly switched back to ESPAsyncWS because the heap usage was horrible
(was an esp-idf core problem).
—
Reply to this email directly, view it on GitHub
<#30 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAO7ISYVP5YMRHWF2CJFSTZGXIKDAVCNFSM6AAAAABJBDNFXCVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TOMRZGU3DI>
.
You are receiving this because you commented.Message ID:
<mathieucarbou/ESPAsyncWebServer/repo-discussions/30/comments/9729564@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Thank you for explaining about the optimization in the network. |
Beta Was this translation helpful? Give feedback.
-
I set up a websocket server on a Wemos D1 mini pro and 1 simple html based client which only connect and after connection only acts with the server when I click on a button.
I have some logging in my ino to log connects and disconnects.
When I start browser windows and connect the first 4 I see logging that they connect.
When I click buttons everything works just fine.
As soon as I connect with a 5th browser there is a disconnect of one of the other 4.
Since the html client starts a reconnect after 0.5 seconds I see the same every 0.5 seconds because every time a connection is lost there are 4 remaining and after 0.5 seconds a new 5th comes in.
So my question is if there is a limit of 4 clients that can connect to the websocket server.
I have plenty of dram free when I connect 4 clients : "DFreeHeap":"22824" , "DHeapFragmentation":"3" , "DMaxFreeBlockSize":"22272"
When I close any 1 of the browser windows the issue stops.
Beta Was this translation helpful? Give feedback.
All reactions