Multithreaded Php Library

Is there any php library (class) to handle multiple HTTP requests with stream_select? Or maybe with non-blocking sockets.

0
source share
3 answers

I guess HTTPRequestPoolwhat you are doing after?

0
source

This may be redundant, but check out NanoServ - the "server daemon for PHP 5.1 +"

Here's a very minimal sample: "Dumb HTTP Server", from the sample page:

<?php

require "nanoserv/handlers/HTTP/Server.php"; 

class dumb_httpd extends \Nanoserv\HTTP\Server {    
    public function on_Request($url) {    
        return "You asked for url : <b>{$url}</b>\n";
    }

}

Nanoserv::New_Listener("tcp://0.0.0.0:800", "dumb_httpd")->Activate();
Nanoserv::Run();

?>
0
source

http://drupal.org/project/httprl. github, ; , drupal. , .

0

All Articles