Skip to content
On this page

Directus Cloud

Everything you need to start building. Provisioned in 90 seconds. Starting at $15/month.

Get Started

This is an auto-generated document to support extension builders understand the internal packages they can utilize. To find our written guides, tutorials, and API/SDK reference, check out our main docs .

Directus / @directus/sdk / realtime / messageCallback

Function: messageCallback() ​

messageCallback(socket, timeout): Promise<undefined | Record<string, any> | MessageEvent<string>>

Wait for a websocket response

Parameters ​

• socket: WebSocketInterface

WebSocket

• timeout: number = 1000

Returns ​

Promise<undefined | Record<string, any> | MessageEvent<string>>

Incoming message object

Defined in ​

realtime/utils/message-callback.ts:15