Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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