mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
ClientContext (tcp) updates (#5089)
* +sync, get/set default nodelay, sync * default nodelay=1 * update flush() * fix return value * ClientContext: put things together * ClientContext: fix debugging messages * WiFiClient: move static members out of the class, add comments * remove circular dependency * parameter and return value for Client::flush&stop, flush timeout raised to 300ms * tcp flush: restart timer on ack receive * OTA protocol needs setNoDelay(true) * fix Ethernet with Client changes * 1 line unredable -> 5 lines readable code * doc * Update client-class.rst * Added details for getters
This commit is contained in:
@ -175,23 +175,19 @@ void WiFiClientSecure::setBufferSizes(int recv, int xmit) {
|
||||
_iobuf_out_size = xmit;
|
||||
}
|
||||
|
||||
void WiFiClientSecure::stop() {
|
||||
flush();
|
||||
if (_client) {
|
||||
_client->wait_until_sent();
|
||||
_client->abort();
|
||||
}
|
||||
WiFiClient::stop();
|
||||
bool WiFiClientSecure::stop(unsigned int maxWaitMs) {
|
||||
bool ret = WiFiClient::stop(maxWaitMs); // calls our virtual flush()
|
||||
// Only if we've already connected, clear the connection options
|
||||
if (_handshake_done) {
|
||||
_clearAuthenticationSettings();
|
||||
}
|
||||
_freeSSL();
|
||||
return ret;
|
||||
}
|
||||
|
||||
void WiFiClientSecure::flush() {
|
||||
bool WiFiClientSecure::flush(unsigned int maxWaitMs) {
|
||||
(void) _run_until(BR_SSL_SENDAPP);
|
||||
WiFiClient::flush();
|
||||
return WiFiClient::flush(maxWaitMs);
|
||||
}
|
||||
|
||||
int WiFiClientSecure::connect(IPAddress ip, uint16_t port) {
|
||||
|
Reference in New Issue
Block a user