Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 20 commits into from
May 16, 2023

Conversation

irvinebroque
Copy link
Contributor

@irvinebroque irvinebroque commented May 9, 2023

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
Copy link

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

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

content/workers/platform/betas.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/connect.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/connect.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/connect.md Outdated Show resolved Hide resolved
Copy link
Contributor

@dom96 dom96 left a comment

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.

content/workers/runtime-apis/connect.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/connect.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/connect.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/connect.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/connect.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/connect.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/connect.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/connect.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/connect.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/connect.md Outdated Show resolved Hide resolved
@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>
content/workers/runtime-apis/connect.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/connect.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/connect.md Outdated Show resolved Hide resolved
@irvinebroque irvinebroque marked this pull request as ready for review May 15, 2023 19:54
@irvinebroque
Copy link
Contributor Author

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

@elithrar elithrar added the product:workers Related to Workers product label May 15, 2023
Copy link
Contributor

@deadlypants1973 deadlypants1973 left a comment

Choose a reason for hiding this comment

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

PCX review

content/workers/platform/limits.md Show resolved Hide resolved
content/workers/runtime-apis/tcp-sockets.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/tcp-sockets.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/tcp-sockets.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/tcp-sockets.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/tcp-sockets.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/tcp-sockets.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/tcp-sockets.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/tcp-sockets.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/tcp-sockets.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/tcp-sockets.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/tcp-sockets.md Outdated Show resolved Hide resolved
content/workers/runtime-apis/tcp-sockets.md Outdated Show resolved Hide resolved
Co-authored-by: Kate Tungusova <70746074+deadlypants1973@users.noreply.github.com>
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
@elithrar
Copy link
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