dongwen7730
2012-10-13 10:09仅使用JavaScript和PHP跟踪连接的客户端
I'm making a basic multiplayer game, and I can't use node.js and socket.io because it's going to be running on a remote server I don't have much control over.
Currently, client-side, I have an ajax request that pings a server-side PHP file every 3 seconds with a unique ID, and if a unique ID isn't pinged within 6 seconds, the player is considered disconnected.
Are there any other techniques that may be more efficient to keep track of connected clients using only JavaScript and PHP?
- 点赞
- 回答
- 收藏
- 复制链接分享
1条回答
为你推荐
- 仅使用JavaScript和PHP跟踪连接的客户端
- javascript
- ajax
- php
- 1个回答