Swoole v4.5.5 版本发布,增加配置项检测

栏目: 软件资讯 · 发布时间: 5年前

内容简介:此版本增加了配置项检测功能,如果设置了不是 Swoole 提供的选项,会产生一个 Warning。 PHP Warning: unsupported option [foo] in @swoole-src/library/core/Server/Helper.php Copy to clipboardErrorCopie...

此版本增加了配置项检测功能,如果设置了不是 Swoole 提供的选项,会产生一个 Warning。

PHP Warning:  unsupported option [foo] in @swoole-src/library/core/Server/Helper.php Copy to clipboardErrorCopied
$http = new Swoole\Http\Server('0.0.0.0', 9501);

$http->set(['foo' => 'bar']);

$http->on('request', function ($request, $response) {
    $response->header("Content-Type", "text/html; charset=utf-8");
    $response->end("<h1>Hello Swoole. #".rand(1000, 9999)."</h1>");
});

$http->start();Copy to clipboardErrorCopied

新增 API

  • 增加 Process\Manager,修改 Process\ProcessManager 为别名 (swoole/library#eac1ac5) (@matyhtf)
  • 支持 HTTP2 服务器 GOAWAY (#3710) (@doubaokun)
  • 增加 Co\map () 函数 (swoole/library#57) (@leocavalcante)

增强

  • 支持 http2 unix socket 客户端 (#3668) (@sy-records)
  • 当 worker 进程退出之后设置 worker 进程状态为 SW_WORKER_EXIT (#3724) (@matyhtf)
  • 在 Server::getClientInfo () 的返回值中增加 send_queued_bytes 和 recv_queued_bytes (#3721) (#3731) (@matyhtf) (@Yurunsoft)
  • Server 支持 stats_file 配置选项 (#3725) (@matyhtf) (@Yurunsoft)

修复

  • 修复 PHP 8 下的编译问题 (zend_compile_string change) (#3670) (@twose)
  • 修复 PHP8 下的编译问题 (ext/sockets compatibility) (#3684) (@twose)
  • 修复 PHP8 下的编译问题 (php_url_encode_hash_ex change) (#3713) (@remicollet)
  • 修复从 'const char*' to 'char*' 的错误类型转化 (#3686) (@remicollet)
  • 修复 HTTP2 client 在 HTTP proxy 下无法工作的问题 (#3677) (@matyhtf) (@twose)
  • 修复 PDO 断线重连时数据混乱的问题 (swoole/library#54) (@sy-records)
  • 修复 UDP Server 使用 ipv6 时端口解析错误
  • 修复 Lock::lockwait 超时无效的问题

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Effective JavaScript

Effective JavaScript

David Herman / Addison-Wesley Professional / 2012-12-6 / USD 39.99

"It's uncommon to have a programming language wonk who can speak in such comfortable and friendly language as David does. His walk through the syntax and semantics of JavaScript is both charming and h......一起来看看 《Effective JavaScript》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具