Network node
WebSocket Send
Sends Data on a WebSocket Client or Server connection: text as it is, structures and JSON as compact JSON, numbers and booleans as their text. Trigger sends on a rising edge; On Change whenever Data changes; Every Frame continuously — both capped by Max Rate (default 30 per second; 0 = no cap, every frame at the real frame rate). On a server, Target picks the client: empty = everyone, a client id, or reply = whoever sent the latest message.
Inputs
| Port | Type | Default |
|---|---|---|
| ConnectionThe Connection output of a WebSocket Client or Server. Several Send nodes may share one. | structure | — |
| DataWhat to send. Text goes as it is; structures and JSON as compact JSON (key order kept); numbers and booleans as their text. With Binary on, a list of numbers goes as Float32 little-endian. | any | |
| TriggerTrigger mode: a rising edge sends Data once. Not connected at that moment = dropped and counted, never sent late. | bool | false |
| Send ModeTrigger: on a rising edge. On Change: whenever Data changes. Every Frame: continuously. The last two obey Max Rate, and a slow link gets the newest value rather than a backlog. | int | 0 |
| Max RateMost sends per second in On Change and Every Frame. Default 30. 0 = no cap: a send every frame, at the real frame rate (60, 120 …). Any other value caps it. | float | 30 |
| TargetServer only. Empty (or all) = every client; a client id such as c2 = just that one; reply = whoever sent the latest message. For exact replies wire Receive’s Client ID here. | string | |
| BinaryOff sends text frames. On sends binary frames: a list of numbers as Float32 little-endian, anything else as its UTF-8 bytes. | bool | false |
| EnableOff sends nothing. | bool | true |
Outputs
| Port | Type |
|---|---|
| Sent | bool |
| Queued | int |
| Dropped | int |
| Error | string |
Open WebSocket Send in the interactive catalog →
WebSocket Send 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.