WebSocket
摘要
WebSocket is a communication protocol that enables real-time, bidirectional communication between web servers and web browsers. Unlike HTTP, where clients receive responses only after sending requests, WebSocket allows continuous bidirectional communication once a connection is established. This makes it ideal for applications requiring real-time updates, such as online chat, collaborative editing, and real-time data visualization. In this chapter, we’ll implement the WebSocket in Axum and explore in detail how to exchange messages between clients and servers.