Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/huanghantao/tinyswoole
a php server extension
https://github.com/huanghantao/tinyswoole
c php php-extension php7 swoole
Last synced: 4 months ago
JSON representation
a php server extension
- Host: GitHub
- URL: https://github.com/huanghantao/tinyswoole
- Owner: huanghantao
- Created: 2018-11-20T10:37:52.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-22T06:48:22.000Z (about 6 years ago)
- Last Synced: 2023-02-26T10:52:43.072Z (almost 2 years ago)
- Topics: c, php, php-extension, php7, swoole
- Language: C
- Homepage:
- Size: 223 KB
- Stars: 26
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Description
a tiny [swoole](https://github.com/swoole/swoole-src)
## Create server
```php
start();```
## Set parameters
```php
$serv->set([
'reactor_num' => 2,
]);
```## Add the server start event callback
```php
on("Start", "onStart");
$serv->start();```
## Add the server connect event callback
```php
on("Connect", "onConnect");
$serv->start();```
## Add the server receive event callback
```php
on("Receive", "onReceive");
$serv->start();```
## send data to client
```php
$serv->send($fd, "hello world");
```## Install from source
```shell
git clone [email protected]:huanghantao/tinyswoole.git && \
cd tinyswoole && \
phpize && \
./configure && \
make && make install
```## Welcome
QQ group:942858122