arduino-libraries / ArduinoBearSSL

Port of BearSSL to Arduino
MIT License
86 stars 49 forks source link

clientRead: keep reading if client not connected but data is available #67

Closed pennam closed 4 months ago

pennam commented 2 years ago

Should fix #56

@Jeroen88 could you give it a spin?

github-actions[bot] commented 2 years ago

Memory usage change @ 832f30a45403fac23aba5f20ae0dfa50bb51cf53

Board flash % RAM for global variables %
arduino:megaavr:uno2018 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkr1000 :small_red_triangle: 0 - +8 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrgsm1400 :small_red_triangle: 0 - +8 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table Board|examples/SHA1
flash|%|examples/SHA1
RAM for global variables|%|examples/SHA256
flash|%|examples/SHA256
RAM for global variables|%|examples/WiFiSSLClient
flash|%|examples/WiFiSSLClient
RAM for global variables|%|examples/MKRGSMSSLClient
flash|%|examples/MKRGSMSSLClient
RAM for global variables|% -|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|- arduino:megaavr:uno2018|0|0.0|0|0.0|0|0.0|0|0.0 arduino:samd:mkr1000|0|0.0|0|0.0|0|0.0|0|0.0|8|0.0|0|0.0 arduino:samd:mkrgsm1400|0|0.0|0|0.0|0|0.0|0|0.0|||||8|0.0|0|0.0
Click for full report CSV ``` Board,examples/SHA1
flash,%,examples/SHA1
RAM for global variables,%,examples/SHA256
flash,%,examples/SHA256
RAM for global variables,%,examples/WiFiSSLClient
flash,%,examples/WiFiSSLClient
RAM for global variables,%,examples/MKRGSMSSLClient
flash,%,examples/MKRGSMSSLClient
RAM for global variables,% arduino:megaavr:uno2018,0,0.0,0,0.0,0,0.0,0,0.0 arduino:samd:mkr1000,0,0.0,0,0.0,0,0.0,0,0.0,8,0.0,0,0.0 arduino:samd:mkrgsm1400,0,0.0,0,0.0,0,0.0,0,0.0,,,,,8,0.0,0,0.0 ```
Jeroen88 commented 2 years ago

I actually do not use this library, so I can not check it, but the code looks good to me.

pennam commented 4 months ago

Closing this because c->connected() should return true if client socket is truly connected or there is data available in the read buffer.