O'Reilly logo

Programming Elm by Jeremy Fairbank

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required