Skip to content

speed up send using new chuncked process #104

Closed
@luc-github

Description

@luc-github

new feature is available in git - need to test it, should be able to divide by 2 the process template function time usage, as no more need 2 loops any more but 1

server.on("/chunked", HTTP_GET, [](){
  server.setContentLength(CONTENT_LENGTH_UNKNOWN);
  server.send(200);
  server.sendContent("<!DOCTYPE html><html><head><title>Chunked
Test</title></head><body>");
  server.sendContent("<p>Chunk 1</p>");
  server.sendContent("<p>Chunk 2</p>");
  server.sendContent("<p>Chunk 3</p>");
  server.sendContent("<p>Chunk 4</p>");
  server.sendContent("<p>Chunk 5</p>");
  server.sendContent("<p>Chunk 6</p>");
  server.sendContent("</html>");
  //not terminating will lead to the same 2 second delay as before
  server.sendContent("");//end of chunked (browser will close immediately)
});

esp8266/Arduino#2199

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions