- // printf("OUT: [%s]\n", $G_content);
- fwrite($new_socket, headers_render($header_out).$content);
- fclose($new_socket);
+
+ $pgflush = new PageFlush($new_socket, $curtime, 20, $header_out, $content);
+
+ if ($pgflush->try_flush($curtime) == FALSE) {
+ // Add $pgflush to the pgflush array
+ array_push($pages_flush, $pgflush);
+ }
+