Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers net

Implements the Node.js net module within Cloudflare Workers to establish TCP socket connections to external servers using the cloudflare:sockets underlying implementation.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers net

Implements the Node.js net module within Cloudflare Workers to establish TCP socket connections to external servers using the cloudflare:sockets underlying implementation.

When To Use

Use when you need to establish direct TCP socket connections to external servers from a Cloudflare Worker using Node.js syntax.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-runtime-apis-nodejs-net-workflow-guide.mdDocumentation detailing the Node.js net API compatibility and configuration requirements for Cloudflare Workers.Questions about documentation detailing the Node.js net API compatibility and configuration requirements for Cloudflare Workers.
examples/workers-runtime-apis-nodejs-net-cloudflare-workers-nodejs-net-socket-con.textA JavaScript code example demonstrating how to use the node:net module to create a socket connection within a Cloudflare Worker.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use the node:net module to create a socket connection within a Cloudfl...
examples/workers-runtime-apis-nodejs-net-cloudflare-workers-nodejs-net-socket-con-2.textA JavaScript example demonstrating how to use the node:net module to create a socket connection within a Cloudflare Worker.Exact payloads, commands, or snippets shown in A JavaScript example demonstrating how to use the node:net module to create a socket connection within a Cloudflare W...

What This Skill Covers

  • To enable built-in Node.js APIs and polyfills, add the nodejs\compat compatibility flag to your Wrangler configuration file. This also enables nodejs\compat...

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.cloudflare.com/workers/runtime-apis/nodejs/net