Swoole-1.8.1 published, add PSR-4 namespace class name

Source: Internet
Author: User
Swoole-1.8.1 has been released, add PSR-4 namespace class name swoole-1.8.1 version has been released, this version is a BUG fix version, mainly fix some bugs in version 1.8.0, in addition to version 1.8.1 Added the PSR-4 namespace style class name.

Namespace example:

To use the namespace class style, modify php. ini and enable swoole. use_namespace = On. After the namespace class name is used, old-style class names are unavailable.

use Swoole\Http\Server;use Swoole\Http\Request;use Swoole\Http\Response;$serv = new Server('127.0.0.1', 9501);$serv->on('Request', function(Request $req, Response $resp) {    var_dump($req->header, get_class($req));    $resp->end("Hello Swoole");});$serv->start();
Major updates:
  • Add the namespace alias of the core class

  • Added the swoole_server-> protect method to protect some connections from being cut off by heartbeat threads.

  • Added swoole_websocker_server: pack and swoole_websocker_server: unpack static methods for manually packaging/unpackaging websocket data frames

  • Fixed the issue that the standard output of log printing is disabled and the SIGPIPE signal is generated continuously, resulting in an endless loop.

  • Fixed openssl compilation failure in the MacOS environment.

  • Added support for redis message subscription and publishing

  • Solved the problem of core dump in multi-port listening when no listener Port callback is set.

  • Fixed the memory leakage problem of asynchronous Client.

  • Fixed the problem where asynchronous Client is disabled in other event callback functions and core dump occurs occasionally.

  • Added support for gzip content compression by swoole_http_client.

:
  • GITHUB: https://github.com/swoole/swoole-src/releases/tag/swoole-1.8.1-stable

  • Open source China: http://git.oschina.net/matyhtf/swoole/tree/swoole-1.8.1-stable

  • PECL: https://pecl.php.net/package/swoole/1.8.1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.