Skip to main content
Version: Streamsheets 3.0

WEBSOCKET.LISTEN

Premium

The WebSocket API is an advanced technology that makes it possible to open a two-way interactive communication session between the user(client) and the server. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply.

Sends a WebSocket message using the given WebSocket connection.

Syntax

=WEBSOCKET.LISTEN(Connection, Target)

Arguments

NameTypeDescription
ConnectionConnectionWebSocket connection created with WEBSOCKET.CONNECT.
TargetTargetINBOX(), OUTBOX("MsgID") or a cell range where the incoming WebSocket messages will be placed.

Return

TypeDescription
BooleanTRUE, if no error.

Examples

FormulaResultComment
=WEBSOCKET.SEND("ws://www.example.org",JSON(A1:B2))
TRUEOpens a WebSocket connection and send the given JSON.