Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
248 views
in Technique[技术] by (71.8m points)

vue.js - What is the way to trigger events on the server side with laravel-websockets if the user does not take an action?

Now I study WebSockets and for this purpose I made a SPA on Laravel using Vue.js and laravel-websockets. Everything works perfectly. Sending and receiving data from users through public and private WebSocket channels works.

And now I want to add users to be able to play a card game. So if the user does not give a card within 10 seconds, how can the server play a card instead? In general, what is the way to trigger events on the server side if the user does not take an action for a certain time? Thanks.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...