ratchet教程
In this tutorial, we’ll be taking a look at Ratchet, a PHP library for working with WebSockets. Let’s start by defining what WebSockets are. MDN says:
在本教程中,我们将看一下Ratchet (一个用于处理WebSocketsPHP库)。 让我们开始定义什么是WebSockets。 MDN说:
WebSockets is an advanced technology that makes it possible to open an interactive communication session between the user’s browser and a server. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply.
WebSockets是一项先进的技术,可以打开用户浏览器和服务器之间的交互式通信会话。 使用此API,您可以将消息发送到服务器并接收事件驱动的响应,而不必轮询服务器以获取答复。