{
  "schemaVersion": 1,
  "snapshotDate": "2026-10-23",
  "slug": "reference-websocket-send",
  "title": "WebSocket Send Frame",
  "section": "Library asset reference",
  "description": "Open, send one text/binary frame, wait for local bufferedAmount to drain, then close in finally. Receipt proves local send only; peer processing is not acknowledged. Uses native Node 24 WebSocket client. No arbitrary handshake headers, TLS ",
  "kind": "node",
  "url": "/wiki/reference-websocket-send/",
  "markdown": "/wiki/reference-websocket-send/index.md",
  "json": "/wiki/reference-websocket-send/index.json",
  "headings": [
    {
      "id": "audited-socket-contract-21-october-2026",
      "title": "Audited socket contract (21 October 2026)",
      "depth": 2
    },
    {
      "id": "catalog-identity",
      "title": "Catalog identity",
      "depth": 2
    },
    {
      "id": "inputs",
      "title": "Inputs",
      "depth": 2
    },
    {
      "id": "outputs",
      "title": "Outputs",
      "depth": 2
    },
    {
      "id": "configuration-schema",
      "title": "Configuration schema",
      "depth": 2
    },
    {
      "id": "source-and-installed-versions",
      "title": "Source and installed versions",
      "depth": 2
    }
  ],
  "sources": [
    "../OpenNodeFlow-Library/work/catalog-all.mjs",
    "../OpenNodeFlow-Library/work/azure-pack-consolidation-20261022/catalog-policy.mjs",
    "../OpenNodeFlow-Library/work/developer-packs-20261022/catalog.mjs",
    "shared/seed.ts",
    "shared/storage-library.ts",
    "shared/variable-library.ts",
    "shared/control-flow.ts",
    "shared/remote-routes.ts",
    "server/runtime-library.ts",
    "shared/error-library.ts",
    "shared/storage-model.ts",
    "shared/builtin-documentation.ts"
  ],
  "family": "websocket",
  "contract": {
    "key": "websocket.send",
    "slug": "websocket-send",
    "name": "WebSocket Send Frame",
    "kind": "node",
    "family": "websocket",
    "packId": null,
    "category": "WebSockets",
    "description": "",
    "inputs": [
      {
        "id": "exec",
        "name": "exec",
        "type": "control",
        "typeName": "Control",
        "required": false
      },
      {
        "id": "message",
        "name": "message",
        "type": "@websocket.type.message",
        "typeName": "WebSocket Outgoing Message",
        "typeKey": "websocket.type.message",
        "typeVersion": 1,
        "required": true
      }
    ],
    "outputs": [
      {
        "id": "next",
        "name": "next",
        "type": "control",
        "typeName": "Control",
        "required": false
      },
      {
        "id": "error",
        "name": "error",
        "type": "control",
        "typeName": "Control",
        "required": false
      },
      {
        "id": "receipt",
        "name": "receipt",
        "type": "@websocket.type.receipt",
        "typeName": "WebSocket Send Receipt",
        "typeKey": "websocket.type.receipt",
        "typeVersion": 1,
        "required": true
      }
    ],
    "configSchema": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "Public wss:// URL; use urlSecret when credential-bearing."
        },
        "urlSecret": {
          "type": "string"
        },
        "protocols": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "maxItems": 10
        },
        "subscribeSecret": {
          "type": "string"
        },
        "timeoutMs": {
          "type": "integer",
          "minimum": 100,
          "maximum": 60000,
          "default": 10000
        },
        "maxMessageBytes": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1048576,
          "default": 262144
        },
        "maxFrames": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 1
        },
        "confirmWrites": {
          "type": "boolean",
          "default": false
        }
      },
      "required": [
        "confirmWrites"
      ],
      "additionalProperties": false
    },
    "documentation": "Open, send one text/binary frame, wait for local bufferedAmount to drain, then close in finally. Receipt proves local send only; peer processing is not acknowledged.\n\nUses native Node 24 WebSocket client. No arbitrary handshake headers, TLS bypass, distributed listener or exactly-once guarantee. Use urlSecret/subscribeSecret for protected values. Errors and health omit raw remote errors, URLs and credential payloads. wss:// required except ws:// loopback mocks. Existing provider JSON types are reused. These v1 assets preserve exact socket/type/executor pins. Verified with isolated fixtures; external account access is unverified.\n\n## Audited socket contract (21 October 2026)\n\nInputs:\n- `message`: `@websocket.type.message`; required.\n\nOutputs:\n- `receipt`: `@websocket.type.receipt`; required.\n\nConfiguration:\n- `url`: string; no automatic default. Public wss:// URL; use urlSecret when credential-bearing.\n- `urlSecret`: string; no automatic default\n- `protocols`: array; no automatic default\n- `subscribeSecret`: string; no automatic default\n- `timeoutMs`: integer; default 10000\n- `maxMessageBytes`: integer; default 262144\n- `maxFrames`: integer; default 1\n- `confirmWrites`: boolean; default false\n\nKnown provider records and list elements have structural schemas. Explicit dynamic payloads, selected query results and provider extensions retain the recursive JSON Value vocabulary; they do not imply a known provider entity. Null is distinct from omission. Runtime validates the exact selected immutable type version; reading newer documentation never repins existing graphs. This audit used synthetic fixtures/local mocks and does not establish live provider authorization or delivery.",
    "runtime": "javascript",
    "tags": [
      "library-expansion",
      "websocket"
    ],
    "source": "baseline-catalog"
  }
}
