-
Notifications
You must be signed in to change notification settings - Fork 126
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
Https connection time issue #155
Comments
For some reason the first connection to the ESP32 webserver takes a long time (complex negotiation procedure?). Unfortunaltely https requests always build up a new connection for each request. In oder to overcome this you could try to use websocket communication - in this case it is a persistent connection and you have this waiting time just once. |
Dear Nathan,
I am not expert on this, but as far as I know establishing a secure connection (HTTPS in this case) takes quite long time due to the negotiation of the secure protocol to be used. This is due to the fact that ESP32 is just a somewhat slow microcontroller and not an Core i7. The HTTP(S) protocol is no persistent connection - so, each request has this initial "overhead".
You could use websocket communication; this is a persistent connection and you have this delay just once during the first connection.
Am 1. Juli 2022 09:38:40 MESZ schrieb NathanKuo0821 ***@***.***>:
I wrote a http post command to control the sensor of the esp32 board. I encountered a problem. It seems that https will take a long time(1~1.5 sec) to parse the data after connecting? Is there any way to improve this part?
If HTTP :
[2022-06-29 16:58:47.052] [HTTPS:I] New connection. Socket FID=49
[2022-06-29 16:58:47.055] [HTTPS:I] Request: POST /openDrawer (FID=49)
If HTTPS:
[2022-06-30 10:21:09.484] [HTTPS:I] New connection. Socket FID=49
[2022-06-30 10:21:11.042] [HTTPS:I] Request: POST /openDrawer (FID=49)
Nathan Kuo
--
Reply to this email directly or view it on GitHub:
#155
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
--
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wrote a http post command to control the sensor of the esp32 board. I encountered a problem. It seems that https will take a long time(1~1.5 sec) to parse the data after connecting? Is there any way to improve this part?
If HTTP :
[2022-06-29 16:58:47.052] [HTTPS:I] New connection. Socket FID=49
[2022-06-29 16:58:47.055] [HTTPS:I] Request: POST /openDrawer (FID=49)
If HTTPS:
[2022-06-30 10:21:09.484] [HTTPS:I] New connection. Socket FID=49
[2022-06-30 10:21:11.042] [HTTPS:I] Request: POST /openDrawer (FID=49)
Nathan Kuo
The text was updated successfully, but these errors were encountered: