Create persistent websocket in Ignition

Ignition uses the jetty libraries to run its webserver and provide its HTTP(s) clients. That includes websocket support.

Start with Jetty's Programming Guide.

However, you will need to adjust for the version of Jetty provided by Ignition, which is v9.4. So use these javadocs instead of the v11 javadocs.

Edit: Hmmm. It appears that Ignition does not package Jetty's websocket client library. You may need to use Java 11's native support:

https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/package-summary.html

Good luck. And report back, please. (:

Edit2: Paul corrected me. Jetty's websocket is bundled after all.

2 Likes