国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

http-client send 返回 false

wangwang

問題描述

<?php
namespace app\controller;

use support\Request;
use support\Response;
use Workerman\Protocols\Http\Chunk;

class IndexController
{
public function index(Request $request)
{
$connection = $request->connection;
$http = new \Workerman\Http\Client();
$http->get(xxx, function ($response) use ($connection) {
$connection->send(new Chunk($response->getBody()));
$connection->send(new Chunk('')); // 發(fā)送空的的chunk代表response結(jié)束
});
return response()->withHeaders([
"Transfer-Encoding" => "chunked",
]);
}
}
使用手冊(cè)Demo 出現(xiàn) $connection->send 發(fā)送返回false

請(qǐng)問是什么問題導(dǎo)致的

312 2 0
2個(gè)回答

shiroi
  • 暫無評(píng)論
walkor 打賞
  • 暫無評(píng)論
??