size_t AsyncResponseStream::write(const uint8_t *data, size_t len){
  if(_finished() || (_content->room() == 0 && ETS_INTR_WITHINISR()))
    return 0;
  if(len > _content->available())
    len = _content->available();
  return _content->write((const char*)data, len);
}
Beispiel #2
0
bool cont_can_yield(cont_t* cont)
{
    return !ETS_INTR_WITHINISR() &&
        cont->pc_ret != 0 && cont->pc_yield == 0;
}
Beispiel #3
0
bool ICACHE_FLASH_ATTR cont_can_yield(cont_t* cont) {
    return !ETS_INTR_WITHINISR() &&
           cont->pc_ret != 0 && cont->pc_yield == 0;
}