X7ROOT File Manager
Current Path:
/opt/alt/tests/alt-php80-pecl-http_4.2.6-4.el8/tests/helper
opt
/
alt
/
tests
/
alt-php80-pecl-http_4.2.6-4.el8
/
tests
/
helper
/
??
..
??
cookie.inc
(319 B)
??
cookie1.inc
(306 B)
??
cookie2.inc
(586 B)
??
dump.inc
(1.01 KB)
??
env.inc
(1.17 KB)
??
html
??
http2.crt
(1.15 KB)
??
http2.key
(1.64 KB)
??
pipeline.inc
(957 B)
??
proxy.inc
(862 B)
??
server.inc
(5.17 KB)
??
upload.inc
(567 B)
Editing: pipeline.inc
<?php include "server.inc"; function respond($client, $msg) { $r = new http\Env\Response; $r->setEnvRequest($msg) ->setHeader("X-Req", $msg->getRequestUrl()) ->send($client); } serve(function($client) { $R = array(STDIN); $W = $E = array(); if (!stream_select($R, $W, $E, 10, 0)) { logger("Client %d timed out", (int) $client); return; } $count = trim(fgets(STDIN)); logger("Expecting %d messages from client %d", $count, (int) $client); /* the peek message */ respond($client, new http\Message($client, false)); logger("Handled the peek request of client %d", (int) $client); /* pipelined messages */ $req = array(); for ($i=0; $i < $count; ++ $i) { $req[] = $m = new http\Message($client, false); logger("Read request no. %d from client %d (%s)", $i+1, (int) $client, $m->getRequestUrl()); } foreach ($req as $i => $msg) { respond($client, $msg); logger("Sent response no. %d to client %d", $i+1, (int) $client); } });
Upload File
Create Folder