使用了bae的socket和php-worker
使用了bae的socket服务,使用了类库https://github.com/Flynsarmy/PHPWebSocket-Chat
可以融合到thinkphp里面,也可以单独运行
在线测试:http://xdxzb.com/Home/PubliMessageServer
:这是用php启动cli进程,如果连接不上,请点击:
http://xdxzb.com/Home/CliServer/start/ 开启服务
http://xdxzb.com/Home/CliServer/close/ 结束服务
http://xdxzb.com/Home/CliServer/check/ 检查服务启动状态
测试再次开启,上线可以看到100条历史记录
从此以后,tp做即时聊天无压力啦
附件是服务端代码,客户端代码在线测试页面就ok了
bae_socket.rar
( 85.9 KB 下载:1340 次 )
AD:真正免费,域名+虚机+企业邮箱=0元

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

WebStorm Mac version
Useful JavaScript development tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Zend Studio 13.0.1
Powerful PHP integrated development environment
