Network node
WebSocket Receive
Messages from a WebSocket Client or Server. JSON arrives as JSON (key order kept), anything else as text; binary frames as a list of floats. Event pulses for one frame whenever a message comes, even the same message twice. Latest gives the newest message of the frame (for values that change); Queue gives one message per Event pulse, in order, so a Counter or Trigger downstream sees every one. Filter: key=value on a JSON field (dotted path), or /regex/. Field picks one field of a JSON message (e.g. text). Messages is this frame's batch; History keeps the last History Size messages, newest last.
Inputs
| Port | Type | Default |
|---|---|---|
| ConnectionThe Connection output of a WebSocket Client or Server. Several Receive nodes may share one; each sees every message. | structure | — |
| ModeLatest: the newest message of the frame on Message, all of them on Messages — for values. Queue: one message per Event pulse, in order, a quiet frame between, so Counter or Trigger sees each one; the rest wait (Pending). | int | 0 |
| FilterEmpty takes every message. key=value takes JSON messages whose field has that value (dotted path: data.type=note). /regex/ matches the raw text. Binary frames pass only an empty filter. | string | |
| EnableOff outputs nothing and forgets its queue and history; on again it takes messages from that moment. | bool | true |
| FieldOne field of a JSON message, dotted path (text, data.name). Message, Messages and History then carry just that value — a list of texts instead of whole messages. Empty = the whole message. | string | |
| History SizeHow many of the last messages History keeps, newest last (0–1000). 0 = no history. Messages, unlike History, is only this frame’s batch. | int | 20 |
| Clear HistoryA rising edge empties History. | bool | false |
Outputs
| Port | Type |
|---|---|
| Message | any |
| Event | bool |
| Messages | structure |
| Count | int |
| Pending | int |
| Client ID | string |
| Binary | structure |
| Dropped | int |
| Error | string |
| History | structure |
Open WebSocket Receive in the interactive catalog →
WebSocket Receive 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.