Receive Photos from WebSockets
Now that the application handles multiple photos, you can update it in real time with new photos via WebSockets. A WebSocket is a network protocol that allows a client application and a server to communicate back and forth. WebSockets are great for applications, such as chat apps, that require real-time notifications. WebSockets allow a server to effectively push data to a client, perfect for updating the photo feed in real time. If you’d like to learn more about WebSockets, I recommend checking out WebSocket: Lightweight Client-Server Communications [Lom15].
In this section, you will hook the application up to a WebSocket server, connecting to the server with JavaScript while using Elm ports to communicate WebSocket ...
Get Programming Elm now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.