Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能不能更新例程文档? #393

Open
coolxitech opened this issue Jan 17, 2025 · 11 comments
Open

能不能更新例程文档? #393

coolxitech opened this issue Jan 17, 2025 · 11 comments

Comments

@coolxitech
Copy link

找半天文档结果不是这么用的,配置个websocket比写项目都累。

@smithyj
Copy link

smithyj commented Jan 19, 2025

直接翻源码看就行了

@coolxitech
Copy link
Author

直接翻源码看就行了

这也太抽象了

@smithyj
Copy link

smithyj commented Jan 19, 2025

还好吧,直接在 websocket 配置里面设置好 listen WebSocket 控制器就可以接受到 HandlerInterface

@coolxitech
Copy link
Author

还好吧,直接在 websocket 配置里面设置好 listen WebSocket 控制器就可以接受到 HandlerInterface

我之前也是看网上也是这么用的,但是越用感觉越别扭。

@yunwuxin
Copy link
Member

看readme

@coolxitech
Copy link
Author

看readme

\think\swoole\helper\websocket,用文档讲的,直接报没有websocket函数.

@yunwuxin
Copy link
Member

安装开发版

@smithyj
Copy link

smithyj commented Jan 19, 2025

@coolxitech 看这个,在 listen 注册事件,其实主要是官方给个 demo 案例 @yunwuxin ,另外大佬看下我那个 think-queue 问题

Image

@smithyj
Copy link

smithyj commented Jan 19, 2025

@yunwuxin 效率真高,发新版本了

@coolxitech
Copy link
Author

虽然看得懂handler但是感觉用起来别扭,后面还是决定用swoole文档使用自定义指令开发websocket。

@yunwuxin
Copy link
Member

使用4.1.0版本 按照readme里的写法就可以了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants