A client wishing to trigger events on the server side, shall use
XMLHttpRequests (Ajax), as they are much more suitable, rather than
messages sent via Websockets. The main purpose for Websockets is to
communicate asynchronously from the server to the client.
您可以通过使用从客户机到服务器的周期性ajax调用来实现这一点。根据文档:
不幸的是,我无法找到仅使用websocket消息实现它的方法。在
相关问题 更多 >
编程相关推荐