mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-29 05:21:37 +03:00
various minor web fixes (#8885)
* httpclient: use refs - httpserver: add chunks in examples * basic https client: update cert * debug log: read() returning -1 is usual and means "nothing to read" * emulation on host: SSL server has never been and is now working * style * move SSL server certs from examples into a single place with appropriate warnings * web-hello-servers: make chunks bigger * factorize template declaration * http-client: add getString(pre-reservation) * mock: add umm_info() * style * comment API in example * style * fix per review
This commit is contained in:
@ -99,9 +99,15 @@ extern "C"
|
||||
}
|
||||
void stack_thunk_dump_stack() { }
|
||||
|
||||
void* umm_info(void*, bool)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Thunking macro
|
||||
#define make_stack_thunk(fcnToThunk)
|
||||
};
|
||||
|
||||
}; // extern "C"
|
||||
|
||||
void configTime(int timezone, int daylightOffset_sec, const char* server1, const char* server2,
|
||||
const char* server3)
|
||||
|
@ -61,10 +61,22 @@ WiFiClient WiFiServer::available(uint8_t* status)
|
||||
return accept();
|
||||
}
|
||||
|
||||
WiFiClient WiFiServer::accept()
|
||||
void WiFiServer::_mockUnclaimed()
|
||||
{
|
||||
if (hasClient())
|
||||
return WiFiClient(new ClientContext(serverAccept(pcb2int(_listen_pcb))));
|
||||
_unclaimed
|
||||
= slist_append_tail(_unclaimed, new ClientContext(serverAccept(pcb2int(_listen_pcb))));
|
||||
}
|
||||
|
||||
WiFiClient WiFiServer::accept()
|
||||
{
|
||||
_mockUnclaimed();
|
||||
if (_unclaimed)
|
||||
{
|
||||
auto ctx = _unclaimed;
|
||||
_unclaimed = _unclaimed->next();
|
||||
return WiFiClient(ctx);
|
||||
}
|
||||
return WiFiClient();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user