Skip to content

Commit

Permalink
Add prefork-server
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Jul 7, 2017
1 parent 700427b commit fa1fdb9
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/main/php/xp/web/Prefork.class.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php namespace xp\web;

use peer\server\PreforkingServer;

/**
* Serves requests from a perforking server
*
* @ext pcntl
* @see xp://peer.server.PreforkingServer
*/
class Prefork extends Standalone {

/**
* Creates a new instance
*
* @param string $host
* @param int $port
* @param int $children How many children to initially fork, defaults to 10
*/
public function __construct($host, $port, $children= 10) {
parent::__construct(new PreforkingServer($host, $port, $children), 'http://'.$host.':'.$port.'/');
}
}

0 comments on commit fa1fdb9

Please sign in to comment.