WebSocket

WebSocket is a full-duplex communication protocol worked over HTTP. WebSockets are often used as an extension of main HTTP interaction and can be used for live updates or notifications.

An actors model is well-suited for implementing WebSocket handlers, because you can combine and isolate code in a single place: in the implementation of the actor. actix-web supports the WebSocket protocol, and in this section, we will add notification functionality to our microservice. Maybe all the features we have implemented with actix-web make our example a bit complex, but it's important for demonstration purposes to keep all features to show how you can combine a server with multiple actors and tasks.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.8.8