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

Improve awc websocket docs #1654

Merged
merged 3 commits into from Sep 7, 2020
Merged

Improve awc websocket docs #1654

merged 3 commits into from Sep 7, 2020

Conversation

popzxc
Copy link
Member

@popzxc popzxc commented Sep 7, 2020

PR Type

Docs

PR Checklist

Check your PR fulfills the following:

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the latest stable rustfmt

Overview

When I first tried to use awc, I had some problems with understanding how to use it with WebSocket.

I thought an example will be very helpful for readers.

@codecov-commenter
Copy link

codecov-commenter commented Sep 7, 2020

Codecov Report

Merging #1654 into master will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1654      +/-   ##
==========================================
- Coverage   53.20%   53.19%   -0.01%     
==========================================
  Files         123      123              
  Lines       11832    11833       +1     
==========================================
  Hits         6295     6295              
- Misses       5537     5538       +1     
Impacted Files Coverage Δ
awc/src/lib.rs 36.36% <ø> (ø)
awc/src/ws.rs 0.00% <ø> (ø)
actix-http/src/header/common/accept.rs 0.00% <0.00%> (ø)
actix-http/src/header/common/if_none_match.rs
actix-http/src/header/common/accept_charset.rs 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a9d4b1...ba9a09b. Read the comment docs.

@popzxc
Copy link
Member Author

popzxc commented Sep 7, 2020

Hm. I'm not sure why CI fails on windows, but passes on Linux / macOS. It doesn't seem that doctest has some platform-specific code.

@Neopallium
Copy link
Member

Looks like an issue getting a cert for TLS:

"the handshake failed: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl\statem\statem_clnt.c:1924:: unable to get local issuer certificate"

I don't think it is related to this PR.

@Neopallium
Copy link
Member

Would it work with "ws://echo.websocket.org" ws instead of wss?

Copy link
Member

@Neopallium Neopallium left a comment

Choose a reason for hiding this comment

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

Looks good.

Copy link
Member

@robjtede robjtede left a comment

Choose a reason for hiding this comment

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

just some wording adjustments, otherwise LGTM

awc/src/lib.rs Outdated Show resolved Hide resolved
awc/src/lib.rs Outdated Show resolved Hide resolved
awc/src/ws.rs Outdated Show resolved Hide resolved
awc/src/ws.rs Outdated Show resolved Hide resolved
awc/src/ws.rs Outdated Show resolved Hide resolved
Co-authored-by: Rob Ede <robjtede@icloud.com>
Copy link
Member

@robjtede robjtede 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 the contribution 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants