Skip to content

How do I use websockets with gjs(Gnome JavaScript)?

I am trying to create a simple application in GJS that sends desktop notifications based on json received via WebSocket. What is the easiest way to use WebSocket in GJS? Thanks in advance.



In GJS you’ll probably have to use libsoup for this.

The GJS documentation is at, such as the Soup.WebSocketConnection.

You’ll probably also want to read the upstream documentation which includes some introductory material.

User contributions licensed under: CC BY-SA
4 People found this is helpful