Plug Database icon

Plug Database

Run Plug Database commands over REST or Socket.

Tools → Wait for Socket Event

AI-generated

Summary

Wait for a specific custom socket event starting with "client:custom:" and return the event data received within a configurable timeout period.

Inputs

  • Tool Category — Select the group of tools to display.
  • Event Name (required) — Exact custom event name to wait for. Must start with client:custom.
  • Listen Timeout (MS) — Maximum time in milliseconds to wait for the first matching socket event after subscribing, up to 300000 ms.
  • Socket ACK Timeout (MS) — Time in milliseconds to wait for connection readiness and subscription acknowledgements.
  • Binary Property Prefix — Prefix for any binary properties created from inline event attachments.
  • Require Payload Signature — Whether inbound payload frames must include a valid HMAC signature.
  • Include Plug Metadata — Whether to include internal __plug metadata object with channel and event information in the output.

Output shape

a single record containing the received socket event's data and optionally binary attachments and metadata.

The node listens for the specified custom event on a Plug socket connection and returns the event payload when it arrives or times out if no matching event is received within the Listen Timeout. Binary attachments are prefixed per configuration. If signature verification is enabled, only payloads with valid HMAC signatures are accepted. The __plug metadata object is included by default but can be disabled.

Examples

Example 1: Receiving a custom status change event

Set Event Name to "client:custom.status.changed" with a 15 second listen timeout to wait for the custom status change event.

Links

Discussion