// provide first image of the MJPEG stream
response.Printf( "HTTP/1.1 200 OK\r\n"
"Cache-Control: no-store, must-revalidate\r\nPragma: no-cache\r\nExpires: 0\r\n"
"Connection: close\r\n"
"Content-Type: multipart/x-mixed-replace; boundary=--myboundary\r\n"
"\r\n" );
response.Printf( "--myboundary\r\n"
"Content-Type: image/jpeg\r\n"
"Content-Length: %u\r\n"
"\r\n", Owner->JpegSize );
response.Send( Owner->JpegBuffer, Owner->JpegSize );
// get final request handling time
handlingTime += static_cast<uint32_t>( duration_cast<std::chrono::milliseconds>( steady_clock::now( ) - startTime ).count( ) );
// set time to provide next images
response.SetTimer( FrameInterval );
why must set response.SetTimer( FrameInterval) ? Does SetTimer means disconnect the current connection and set the next connection time?