Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers TCP sockets

Teaches how to use the connect() API to establish outbound TCP connections from Cloudflare Workers to support application-layer protocols like SSH, MQTT, or database wire protocols.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers TCP sockets

Teaches how to use the connect() API to establish outbound TCP connections from Cloudflare Workers to support application-layer protocols like SSH, MQTT, or database wire protocols.

When To Use

Use when you need to implement outbound TCP connections for protocols such as SSH, SMTP, or direct database communication from a Worker environment.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-runtime-apis-tcp-sockets-workflow-guide.mdDocumentation detailing the connect API, SocketAddress, SocketOptions, and SocketInfo for establishing outbound TCP connections in Cloudflare Workers.Questions about documentation detailing the connect API, SocketAddress, SocketOptions, and SocketInfo for establishing outbound TCP c...
examples/workers-runtime-apis-tcp-sockets-cloudflare-workers-tcp-sockets-gopher-c.textA JavaScript code example demonstrating how to use the cloudflare:sockets API to establish a TCP connection to a gopher server.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use the cloudflare:sockets API to establish a TCP connection to a goph...
examples/workers-runtime-apis-tcp-sockets-cloudflare-workers-tcp-sockets-connect-.textA JavaScript code example demonstrating how to establish a TCP connection and initiate a STARTTLS handshake using the cloudflare:sockets API.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to establish a TCP connection and initiate a STARTTLS handshake using the...
examples/workers-runtime-apis-tcp-sockets-cloudflare-workers-tcp-sockets-connect.textA JavaScript code example demonstrating how to use the connect function from cloudflare:sockets to establish a TCP connection to a remote host.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use the connect function from cloudflare:sockets to establish a TCP co...
examples/workers-runtime-apis-tcp-sockets-cloudflare-workers-tcp-sockets-connect-2.textA JavaScript code example demonstrating how to use the connect function from the cloudflare:sockets module to establish a TCP connection.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use the connect function from the cloudflare:sockets module to establi...

What This Skill Covers

  • The Workers runtime provides the connect() API for creating outbound TCP connections ↗ from Workers.
  • Main sections: connect(), SocketAddress, SocketOptions, SocketInfo, Socket.

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/tcp-sockets