-
Notifications
You must be signed in to change notification settings - Fork 13.3k
WiFiClient::write refactoring #1570
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
Conversation
f08bb26
to
b61c33d
Compare
Having WiFiClient::write(buf, length) require a stream object breaks compatibility with the Generic Arduino WiFiClient function and is not noted in the ESP Arduino documentation. (Caused me to loose some time today tracking this issue down). It also means Client.write() will behave differently than other stream-like function including serial.write(). I was casting some structures as a byte array and passing the pointer to .write functions. Since they aren't objects with available and source members, complier throws an issue. |
Nevermind, please ignore. Not sure why It was defaulting to the stream function when I was passing in a byte array the exact same way I passed it into Serial.write() but I correctly cast it and the compiler took it anyway. |
WiFiClient has the Before these changes, we had an additional overloaded template member function Edit: this |
Yep, that's what's biting my butt right now. Thanks for maintaining this codebase. |
BufferStrategy
for payloads already present in RAM, andChunkedStrategy
for payloads which need to be copied to RAM on the fly._timeout
member (1 second by default). Previously timeout was hard-coded to 5 secondsWiFiClientSecure
still has 5 seconds timeout hardcoded, some refactoring is necessary to expose_timeout
member at the point when write function is called by axTLS.