PHP_Fork
[ class tree: PHP_Fork ] [ index: PHP_Fork ] [ all elements ]

File: browser_pool.php

Source Location: /PHP_Fork-0.3.2/examples/browser_pool.php

Classes:

Classes definition. In real world you surely want to keep each class into a separate file, then include() it into your application.

Page Details:

Includes:

require_once("Snoopy.class.php") [line 30]
require_once("PHP/Fork.php") [line 29]
PHP_Fork class usage examples ================================================================================== NOTE: In real world you surely want to keep each class into a separate file, then include() it into your application.

For this examples is more useful to keep all_code_into_one_file, so that each example shows a unique feature of the PHP_Fork framework. ================================================================================== browser_pool.php

This example show a "real" usage example: a command line interactive tool that sends cuncurrent requests to a given URL, using a dynamic process pool. The pool start size is defined into the constant NUM_START_THREAD The application show a simple CLI prompt, user can type an URL and the number of requests to perform. The application takes care of forking processes (when needed), sending requests and collect results. Min, max and average response times are reported.

This example requires the Snoopy class (http://sourceforge.net/project/?group_id=2091)

==================================================================================


NUM_START_THREAD [line 33]

NUM_START_THREAD = 2

[ Top ]



showHelpMsg [line 92]

void showHelpMsg( )



[ Top ]



Documentation generated on Mon, 11 Mar 2019 15:41:27 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.