Skip to content

WebSocket Connect Node

Web/WebSocket

WebSocket Connect

Opens a WebSocket connection. Immediately triggers on_connect with the session, then invokes on_message for each incoming message. Holds execution until the connection closes, then triggers on_close.

websocket_connectwebLong running
Inputs2
Outputs4
Security exposure4/10
Packageweb

Ratings

Scores range from 0 to 10. Higher values mean more impact, exposure, or operational weight.

SecurityAttack surface and exposure impact.
4/10Medium
PrivacyPotential sensitivity of processed data.
3/10High
PerformanceRuntime or resource pressure.
3/10High
GovernancePolicy, audit, or compliance impact.
5/10Medium
ReliabilityOperational stability considerations.
4/10Medium
CostExternal or compute cost impact.
1/10High

Input Pins

2

Execute

Execution
exec_in

Initiate the WebSocket connection

Config

Struct
config

WebSocket connection configuration (URL, optional headers, optional timeout)

WebSocketConfigWebSocketConfig4 fields
urlstringrequired
headersobject | null
default null
*stringmap value
timeout_secondsinteger:uint64
format uint64default 0min 0
tlsTlsConfig
default {"secure":false,"certificate":null,"ca_...
secureboolean
default false
certificateanyOf (2)
default null
variant 1TlsCertificatevariant
certificate_pemstringrequired
private_key_pemstringrequired
variant 2nullvariant
ca_certificate_pemstring | null
default null
server_namestring | null
default null
accept_invalid_certificatesboolean
default false
Schema enforced

Output Pins

4

On Connect

Execution
on_connect

Fires immediately after the connection is established

Session

Struct
session

WebSocket session reference for use with Send/Close nodes

WebSocketSessionWebSocketSession2 fields
ref_idstringrequired
urlstringrequired
Schema enforced

On Close

Execution
on_close

Fires when the WebSocket connection is closed (by server, timeout, or error)

Error

Execution
exec_error

Fires if the connection fails to establish

Node Info

Internal name
websocket_connect
Category
Web/WebSocket
Function references
Can reference functions