摘要:
1:先创建服务端文件MySql.php再创建数据库以及简单的数据表 <?php use Swoole\Runtime; use Swoole\Coroutine; use function Swoole\Coroutine\run; class MySql { public function go( 阅读全文
摘要:
1:先创建服务端文件WebSocket.php <?php class WebSocket { private $ws = null; public function __construct(){ //创建WebSocket Server对象,监听0.0.0.0:9502端口 $this -> ws 阅读全文
摘要:
1:因为是HTTP协议 开启服务后请求客户端HTML文件,直接浏览器URL,先创服务端文件HTTP.php <?php class HTTP { private $server = null; public function __construct(){ $this -> server = new 阅读全文
摘要:
1:创建服务端文件UDP.php <?php class UDP { private $server = null; public function __construct(){ $this -> server = new Swoole\Server('127.0.0.1', 9502, SWOOL 阅读全文
摘要:
1:先创建服务端文件 TCP.php <?php class TCP { private $server = null; public function __construct(){ $this -> server = new Swoole\Server('127.0.0.1', 9501); $t 阅读全文