example/socket_server.php
public function handle($conn, \React\EventLoop\LoopInterface $loop)
    {
        sleep(1);
        var_dump(getmypid() . ":" . fread($conn, 1024));
        fwrite($conn, "HTTP/1.1 200 OK
Server: GitHub.com
Date: Fri, 01 Jul 2016 03:38:21 GMT
Content-Type: text/html; charset=utf-8\r\n\r\n");
    }
public function handle($conn, \React\EventLoop\LoopInterface $loop)
    {
        sleep(1);
        var_dump(getmypid() . ":" . fread($conn, 1024));
        fwrite($conn, "HTTP/1.1 200 OK
Server: GitHub.com
Date: Fri, 01 Jul 2016 03:38:21 GMT
Content-Type: text/html; charset=utf-8\r\n\r\n");
    }
public function handle ( $ conn , \ React \ EventLoop \ LoopInterface $ loop ) { sleep ( 1 ) ; var_dump ( getmypid ( ) . ":" . fread ( $ conn , 1024 ) ) ; fwrite ( $ conn , "HTTP/1.1 200 OK
Server: GitHub.com
Date: Fri, 01 Jul 2016 03:38:21 GMT
Content-Type: text/html; charset=utf-8\r\n\r\n" ) ; }
handle request

@param $conn
@param \React\EventLoop\LoopInterface $loop
@return mixed
handle request