Skip to content

[Workers] Runtime API: TCP Socket API Docs connect()#8795

Merged
elithrar merged 20 commits into
productionfrom
bib/sockets-docs
May 16, 2023
Merged

[Workers] Runtime API: TCP Socket API Docs connect()#8795
elithrar merged 20 commits into
productionfrom
bib/sockets-docs

Conversation

@irvinebroque

@irvinebroque irvinebroque commented May 9, 2023

Copy link
Copy Markdown
Contributor

Do not merge yet

  • /runtime-apis/connect
  • /platform/protocols (Think this is worth adding — "What protocols can I use with Cloudflare Workers?". Will cover HTTP, WebSockets, Outbound TCP, reference Socket Workers blog post)
  • Address TODO comments
  • How do TCP connections count towards subrequest limits?
  • Example showing closing sockets, allowHalfOpen differences (fe93dd3)
  • Example showing error handling (https://github.com/cloudflare/cloudflare-docs/pull/8795/files#r1188052039)
  • Clarify that connections should not / cannot be created globally (a4f0485)
  • Add link to original blog post at top of /platform/protocols section, and cross-link to that from the /runtime-apis/connect docs page
  • Clarify local dev (--experimental-local)

After 05/17/23

  • Remove --experimental-local caveat

@irvinebroque irvinebroque changed the title TCP Socket API Docs (connect() TCP Socket API Docs connect() May 9, 2023
@github-actions
github-actions Bot requested a review from deadlypants1973 May 9, 2023 01:58
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 9, 2023

Copy link
Copy Markdown

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: c928cfb
Status: ✅  Deploy successful!
Preview URL: https://0ff8bbb7.cloudflare-docs-7ou.pages.dev
Branch Preview URL: https://bib-sockets-docs.cloudflare-docs-7ou.pages.dev

View logs

Comment thread content/workers/platform/betas.md Outdated
Comment thread content/workers/runtime-apis/connect.md Outdated
Comment thread content/workers/runtime-apis/connect.md Outdated
Comment thread content/workers/runtime-apis/connect.md Outdated
Comment thread content/workers/runtime-apis/connect.md Outdated
Comment thread content/workers/runtime-apis/connect.md Outdated

@dom96 dom96 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together! There are some things that need to be changed but in general looking good.

Comment thread content/workers/runtime-apis/connect.md Outdated
Comment thread content/workers/runtime-apis/connect.md Outdated
Comment thread content/workers/runtime-apis/connect.md Outdated
Comment thread content/workers/runtime-apis/connect.md Outdated
Comment thread content/workers/runtime-apis/connect.md Outdated
Comment thread content/workers/runtime-apis/connect.md Outdated
Comment thread content/workers/runtime-apis/connect.md Outdated
Comment thread content/workers/runtime-apis/connect.md Outdated
Comment thread content/workers/runtime-apis/connect.md Outdated
Comment thread content/workers/runtime-apis/connect.md Outdated
@Maddy-Cloudflare Maddy-Cloudflare changed the title TCP Socket API Docs connect() [Runtime API] TCP Socket API Docs connect() May 9, 2023
@deadlypants1973
deadlypants1973 removed the request for review from Maddy-Cloudflare May 10, 2023 13:57
@deadlypants1973 deadlypants1973 changed the title [Runtime API] TCP Socket API Docs connect() [Workers] Runtime API: TCP Socket API Docs connect() May 10, 2023
irvinebroque and others added 2 commits May 11, 2023 22:42
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
Comment thread content/workers/runtime-apis/connect.md Outdated
Comment thread content/workers/runtime-apis/connect.md Outdated
Comment thread content/workers/runtime-apis/connect.md Outdated
@irvinebroque
irvinebroque marked this pull request as ready for review May 15, 2023 19:54
@irvinebroque

Copy link
Copy Markdown
Contributor Author

@deadlypants1973 — I'll add the /platform/protocols section shortly, but the rest of this is ready for your 👀

Comment thread content/workers/runtime-apis/connect.md Outdated
@elithrar elithrar added the product:workers Related to Workers product label May 15, 2023

@deadlypants1973 deadlypants1973 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PCX review

Comment thread content/workers/platform/limits.md
Comment thread content/workers/runtime-apis/tcp-sockets.md Outdated
Comment thread content/workers/runtime-apis/tcp-sockets.md Outdated
Comment thread content/workers/runtime-apis/tcp-sockets.md Outdated
Comment thread content/workers/runtime-apis/tcp-sockets.md Outdated
Comment thread content/workers/runtime-apis/tcp-sockets.md Outdated
Comment thread content/workers/runtime-apis/tcp-sockets.md Outdated
Comment thread content/workers/runtime-apis/tcp-sockets.md Outdated
Comment thread content/workers/runtime-apis/tcp-sockets.md Outdated
Comment thread content/workers/runtime-apis/tcp-sockets.md Outdated
Comment thread content/workers/runtime-apis/tcp-sockets.md Outdated
Comment thread content/workers/runtime-apis/tcp-sockets.md Outdated
Comment thread content/workers/runtime-apis/tcp-sockets.md Outdated
Comment thread content/workers/runtime-apis/tcp-sockets.md Outdated
Comment thread content/workers/runtime-apis/tcp-sockets.md Outdated
Co-authored-by: Kate Tungusova <70746074+deadlypants1973@users.noreply.github.com>
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
@elithrar

Copy link
Copy Markdown
Collaborator

Committed suggestions for @irvinebroque so we can merge ahead of #8914 and before 9AM ET :)

@elithrar
elithrar merged commit 1e0a1e5 into production May 16, 2023
@elithrar
elithrar deleted the bib/sockets-docs branch May 16, 2023 12:17
elithrar added a commit that referenced this pull request May 16, 2023
* add /runtime-apis/connect

* Add note about global scope

* Add error handling section

* Add section about closing sockets with examples of allowHalfOpen

* Fix example, add note about --experimental-local

* Apply suggestions from code review

Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>

* Apply suggestions from code review

Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>

* Remove expectedHostname

* Clarify connection between connect() and max open connections

* Fix broken link

* Move StartTlS considerations up to StartTLS section

* Fix error handling code block

* Formatting, intro sentence to error handling example

* Clarify that existing readers/writers cannot be reused after .startTls()

* Rename page from connect to tcp-sockets

* Add /protocols page

* Edits to /protocols

* /runtime-apis/connect -> /runtime-apis/tcp-sockets

* Fix broken URL

* workers: Apply suggestions from code review

Co-authored-by: Kate Tungusova <70746074+deadlypants1973@users.noreply.github.com>
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>

---------

Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
Co-authored-by: Matt Silverlock <msilverlock@cloudflare.com>
Co-authored-by: Kate Tungusova <70746074+deadlypants1973@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workers Related to Workers product

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants