Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
Patch Available
Description
The PHP libs only have TSimpleServer implemented currently. Given PHP supports forking through the PCNTL functions, it's possible to add a TForkingServer implementation, much akin to the perl library implementation.
Example code usage:
$processor = new SomeProcessor(new SomeHandler()); $transport = new TServerSocket(); $transport->setAcceptTimeout(1000); $transportFactory = new TTransportFactory(); $protocolFactory = new TBinaryProtocolFactory(); $server = new TForkingServer($processor, $transport, $transportFactory, $transportFactory, $protocolFactory, $protocolFactory); $server->serve();