当前位置:网站首页>Version 4.5.7 of swoole was released, and the -- enable swote JSON compilation option was added

Version 4.5.7 of swoole was released, and the -- enable swote JSON compilation option was added

2020-11-10 10:44:00 Shen mourning

Swoole Participating in 2020 year OSC China open source project selection , The selection has come to the last week , What else Swoole Please click the link below to post your article : https://www.oschina.net/p/swoole-server

Added in the last version swoole_substr_json_decode function , Due to a small number of users' extended dependency order problem , So add a compile option --enable-swoole-json, For enabling swoole_substr_json_decode Support

If you need to use this function in this version , You need to add this option at compile time . At the same time, this version also supports negative offset

$val = json_encode(['hello' => 'swoole']);
$str = pack('N', strlen($val)) . $val . "\r\n";
$l = strlen($str) - 6;
var_dump(json_decode(substr($str, 4, $l), true));
var_dump(swoole_substr_json_decode($str, 4, $l, true));
var_dump(swoole_substr_json_decode($str, -(strlen($str)-4), $l, true));

The update is as follows :

newly added API

  • Coroutine\Socket Client added writeVector, writeVectorAll, readVector, readVectorAll Method (#3764) (@huanghantao)

enhance

  • by server->stats increase task_worker_num and dispatch_count (#3771) (#3806) (@sy-records) (@matyhtf)
  • Added extended dependencies , Include json, mysqlnd, sockets (#3789) (@remicollet)
  • Limit server->bind Of uid The minimum value is INT32_MIN (#3785) (@sy-records)
  • by swoole_substr_json_decode Added compilation options , Support negative offset (#3809) (@matyhtf)
  • Support CURL Of CURLOPT_TCP_NODELAY Options (swoole/library#65) (@sy-records) (@deminy)

Repair

  • Fixed error in synchronizing client connection information (#3784) (@twose)
  • Repair hook scandir Function problem (#3793) (@twose)
  • Repair the process barrier barrier Mistakes in (swoole/library#68) (@sy-records)

kernel

  • Use boost.stacktrace Optimize print-backtrace (#3788) (@matyhtf)

Swoole The official account

版权声明
本文为[Shen mourning]所创,转载请带上原文链接,感谢