8e09683fc7ab542c28a2b366d217e2862369d849
2 class HelloWorldApp
extends Mistral
4 public static function main($http_request) {
5 #print_r($http_request);
8 self
::parse_headers($http_request);
9 #$xhprof_data = xhprof_disable();
10 #print_r($xhprof_data);
12 $output = "Hello World!";
13 $answer = array('status_code' => '200 OK',
14 'connection' => $_SERVER['HTTP_CONNECTION'],
15 'content-type' => 'text/html',
16 'content-length' => strlen($output),
25 while( $cntChildren < $maxChildren ) {
31 echo "Warning: Cannot spawn child process!!!\n";
37 echo 'Spawn Child [' . getMyPid() . '] Port ' . $startport . "\n";
38 $app = new HelloWorldApp('0.0.0.0', $startport, 3);
39 $app->register_callback('HelloWorldApp::main');