All Projects → swoole → hhvm-swoole

swoole / hhvm-swoole

Licence: other
Swoole extension for hhvm platform.

Programming Languages

C++
36643 projects - #6 most used programming language
hack
652 projects
CMake
9771 projects

hhvm-swoole

Swoole on HHVM.

Requirements

  • Linux
  • PHP-7.1 or later
  • GCC-5 or later
  • Swoole-4.2.12 or later
  • HHVM-3.21 or later

Build libswoole.so

git clone https://github.com/swoole/swoole-src.git
cd swoole-src
phpize
./configure
cmake .
make -j 4

Build hhvm_swoole.so

git clone https://github.com/swoole/hhvm-swoole.git
cd hhvm-swoole
ln -s ../swoole-src/ swoole
hphpize
cmake .
make

Run

cd examples
hhvm -vDynamicExtensions.0=../hhvm_swoole.so tcp_server.php
hhvm -vDynamicExtensions.0=../hhvm_swoole.so udp_server.php

HHVM settings

vim /etc/hhvm/php.ini
hhvm.dynamic_extensions[hhvm_swoole] = /your/path/to/hhvm-swoole/hhvm_swoole.so

Supported features

  • Swoole\Server->__construct
  • Swoole\Server->on (onWorkerStart/onWorkerStop/onConnect/onClose/onReceive/onPacket/onTask/onFinish)
  • Swoole\Server->set
  • Swoole\Server->start
  • Swoole\Server->task
  • Swoole\Server->send
  • Swoole\Server->sendto
  • Swoole\Server->sendfile
  • Swoole\Server->close
  • Swoole\Server->exist
  • Swoole\Server->getClientInfo
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].