Network node

WebSocket Client

Connects to a WebSocket server (ws:// or wss://) and keeps the connection alive: reconnects on its own, sends your On Connect messages again after every reconnect, and notices a dead link by ping. Wire Connection into WebSocket Receive and WebSocket Send nodes. Headers, authentication and timing are in the Settings tab.

Inputs

PortTypeDefault
URLThe server to connect to: ws://host:port/path, or wss:// for an encrypted link. The network menu lists the Grafit WebSocket Servers on this network (open to other devices). Changing it reconnects.stringws://127.0.0.1:8765/
Auto ReconnectOn: a lost or refused connection is retried on its own — 0.5 s, then 1, 2, 4 … up to 30 s between tries, at once when the network comes back. Off: the node stays failed until the URL or Enable changes.booltrue
EnableOff closes the connection cleanly (close code 1000). On connects again.booltrue

Outputs

PortType
Connectionstructure
Connectedbool
Statestring
Errorstring
Latencyfloat
Reconnectsint

Open WebSocket Client in the interactive catalog →

WebSocket Client is one of 381 nodes in Grafit Pro.

Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.

More Network nodes