-
mac安装swoole
brew install homebrew/php/php56-swoole
-
重启apache
sudo brew services restart httpd24
git clone git@github.com:larry-666/swoole-chat-room.git
- 运行
swoole websocket server
cd www
cd swoole/socket
php server.php
- 打开
http://localhost/swoole/socket/client.html
- 使用守护进程
把
$server
的daemonize
设置为true