Commit Graph

535 Commits

Author SHA1 Message Date
Alex Butler 1b47964f18 split write and write_out_buffer internals
Fix internal method naming
2023-05-30 18:26:59 +01:00
Alex Butler 2ef5b9a5e2 Buffer writes before writing to the underlying stream
Add write_buffer_size
Set default 128 KiB
2023-05-30 18:26:59 +01:00
Alex Butler 2cf7cfef04 Rework write 100k bench to have a slow writes & even slower flushes 2023-05-30 18:26:25 +01:00
Alexey Galakhov 5a3115c09b
Merge pull request #357 from alexheretic/flush-writes-less
Rework to remove implicit flushes
2023-05-28 18:40:35 +02:00
Alex Butler 06e55a4ef2 Refactor additional_send writing 2023-05-27 13:27:55 +01:00
Alex Butler 84a54b76e6 Rename methods to `read`, `send`, `write` & `flush`
Refine docs
Add `send` method
Add deprecated versions of write_message, write_pending,
read_message
Handle pong WriteBufferFull error
Add changelog
2023-05-27 13:19:13 +01:00
Daniel Abramov 79b39eb146
Merge pull request #356 from snapview/dependabot/cargo/criterion-0.5.0
Update criterion requirement from 0.4.0 to 0.5.0
2023-05-26 21:36:49 +02:00
Alex Butler 0203a1849b Remove send_queue, use out_buffer instead 2023-05-24 18:42:09 +01:00
Alex Butler 483d229707 Remove implicit write flushing 2023-05-24 18:42:09 +01:00
Alex Butler d298089bf3 Add write 100k micro-bench 2023-05-24 18:42:03 +01:00
dependabot[bot] 7242a22b91
Update criterion requirement from 0.4.0 to 0.5.0
Updates the requirements on [criterion](https://github.com/bheisler/criterion.rs) to permit the latest version.
- [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bheisler/criterion.rs/compare/0.4.0...0.5.0)

---
updated-dependencies:
- dependency-name: criterion
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-24 08:57:02 +00:00
Daniel Abramov 371f823044
Merge pull request #354 from CBenoit/fix-error-on-bad-root-cert
Gracefully handle invalid native root certificates
2023-05-19 00:22:07 +02:00
Benoît CORTIER ee3ffc9e9d
Gracefully handle invalid native root certificates
Before this patch, the `rustls::RootCertStore::add` method was used
to add all the root certificates found by `rustls_native_certs` crate.
This is a problem when an ancient or invalid certificate is present
in the native root store. `rustls` documentation says the following:

> This is suitable for a small set of root certificates that
> are expected to parse successfully. For large collections of
> roots (for example from a system store) it is expected that
> some of them might not be valid according to the rules `rustls`
> implements. As long as a relatively limited number of certificates
> are affected, this should not be a cause for concern. Use
> `RootCertStore::add_parsable_certificates` in order to add as many
> valid roots as possible and to understand how many certificates have
> been diagnosed as malformed.

With this patch, `RootCertStore::add_parsable_certificates` is used
instead for maximal compability with system store.

> Parse the given DER-encoded certificates and add all that can be
> parsed in a best-effort fashion.
>
> This is because large collections of root certificates often include
> ancient or syntactically invalid certificates.
2023-05-17 11:49:28 -04:00
Daniel Abramov e5efe537b8
Merge pull request #351 from nickelc/deps/webpki
Remove unused `TlsError::Webpki` error variant
2023-04-26 04:14:30 +02:00
Constantin Nickel 8a436e7550 Remove unused `TlsError::Webpki` error variant
The error variant is no longer needed since `rustls` 0.21.
2023-04-25 22:22:36 +02:00
Daniel Abramov 314feea305
Merge pull request #348 from atouchet/trv
Switch build status badge to GitHub Actions
2023-04-14 10:25:07 +02:00
Alex Touchet 50d5a37bdc
Switch build status badge to GitHub Actions 2023-04-13 22:25:37 -07:00
Daniel Abramov 79fa37888f
Merge pull request #347 from snapview/github-actions
Exchange Travis CI for GitHub Actions
2023-04-12 17:00:24 +02:00
Daniel Abramov 746d938412 Use `cargo fmt` from nightly 2023-04-12 16:46:55 +02:00
Daniel Abramov a4863d3f10 Make code compile with any feature set 2023-04-12 16:33:24 +02:00
Daniel Abramov 7e4a15446d Properly activate features for examples and tests 2023-04-12 16:30:15 +02:00
Daniel Abramov 87e9f576af Make `cargo fmt` happy 2023-04-12 16:09:09 +02:00
Daniel Abramov e758f7dc2a Exchange Travis CI for GitHub Actions 2023-04-12 12:58:52 +02:00
Daniel Abramov 869a67ca0b Bump version 2023-04-12 12:52:18 +02:00
Daniel Abramov a873befaae
Merge pull request #345 from mlemesle/fix/webpki-error-variant
Fix not compiling features rustls-tls-native-roots and rustls-tls-webpki-roots
2023-04-07 11:31:42 +02:00
Martin Lemesle 1f6c62d301 Fix not compiling features rustls-tls-native-roots and rustls-tls-webpki-roots 2023-04-07 10:11:53 +02:00
dependabot[bot] 92d65e1104
Update webpki-roots requirement from 0.22 to 0.23 (#343)
Updates the requirements on [webpki-roots](https://github.com/rustls/webpki-roots) to permit the latest version.
- [Release notes](https://github.com/rustls/webpki-roots/releases)
- [Commits](https://github.com/rustls/webpki-roots/commits)

---
updated-dependencies:
- dependency-name: webpki-roots
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-03 21:49:59 +02:00
Daniel Abramov 67e25fdd68
Merge pull request #341 from snapview/dependabot/cargo/rustls-0.21.0
Update rustls requirement from 0.20.0 to 0.21.0
2023-03-30 13:04:30 +02:00
dependabot[bot] 1422d47ec0
Update rustls requirement from 0.20.0 to 0.21.0
Updates the requirements on [rustls](https://github.com/rustls/rustls) to permit the latest version.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/RELEASE_NOTES.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.20.0...v/0.21.0)

---
updated-dependencies:
- dependency-name: rustls
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-30 08:57:37 +00:00
Daniel Abramov 42b8797e8b Revert "Add `permessage-deflate` support"
This reverts commit edb2377540.

See https://github.com/snapview/tungstenite-rs/pull/328#issuecomment-1480349206
2023-03-23 00:15:53 +01:00
kazk edb2377540 Add `permessage-deflate` support 2023-03-18 12:36:01 +01:00
Daniel Abramov e1033afd95
Merge pull request #337 from A5rocks/fix-frame-display
Display correct payload in Frame::fmt
2023-02-12 18:03:58 +01:00
EXPLOSION 5125c59dfa Display correct payload in Frame::fmt 2023-02-11 23:23:42 +00:00
Jack Wills 657faf427f docs: message.rs typo
Simple typo fix of is_close() method
2023-02-01 05:46:06 +01:00
Sebastian Dröge c6769e3dae Switch from base64 0.20 to data-encoding 2
base64 0.21 deprecated the simple API and requires quite a bit more code
for the simple usage here, while data-encoding provides exactly the API
needed and is also actively maintained.
2023-01-15 17:08:18 +01:00
dependabot[bot] c469214dd3
Update base64 requirement from 0.13.0 to 0.20.0 (#326)
Updates the requirements on [base64](https://github.com/marshallpierce/rust-base64) to permit the latest version.
- [Release notes](https://github.com/marshallpierce/rust-base64/releases)
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/marshallpierce/rust-base64/compare/v0.13.0...v0.20.0)

---
updated-dependencies:
- dependency-name: base64
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-13 13:43:22 +01:00
ssrlive 3fc7fb412c
Mark some functions as public (#315)
Fixes #315.

Co-authored-by: Daniel Abramov <inetcrack2@gmail.com>
2022-12-02 15:35:22 +01:00
Daniel Abramov 72c6f6cdd0
Bump version (#322) 2022-11-28 22:47:45 +01:00
dependabot[bot] 85f153c6fc
Update env_logger requirement from 0.9.0 to 0.10.0 (#320)
Updates the requirements on [env_logger](https://github.com/rust-cli/env_logger) to permit the latest version.
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-25 10:31:47 +01:00
Daniel Abramov 7174996e77
Merge pull request #319 from howjmay/typo
fix typos
2022-11-24 17:51:40 +01:00
Yang Hau 984ad9d6c7 fix typos 2022-11-22 20:23:59 +08:00
Alexey Galakhov c7e9e0cbae
Merge pull request #317 from atouchet/lic
Use SPDX license format
2022-11-19 02:12:26 +01:00
Alex Touchet eb9d440a14
Use SPDX license format 2022-11-18 16:57:44 -08:00
Alexey Galakhov 438210688f
Merge pull request #298 from riptide-org/ISSUE-199-READ-BODY-ON-FAILED-READ
Error response on client type returns request body upon non receiving non 101 status code from server
2022-11-15 00:57:00 +01:00
Josiah Bull 1c657d4c6a
feat: switched response type from Vec<u8> to Option<Vec<u8>> to allow returning of differentiation of no body from empty body. 2022-10-19 12:30:46 +13:00
Josiah Bull 36ab770059
feat: error type returns `Vec<u8>` instead of `Option<String>` 2022-10-19 12:30:29 +13:00
Josiah Bull 4a7beaa897
feat: error responses return body upon non 101 status code
modified `client::Response` type to contain `String` instead of `()` to achieve this.
2022-10-19 12:29:45 +13:00
Daniel Abramov b473e19f7e
Merge pull request #302 from snapview/dependabot/cargo/criterion-0.4.0
Update criterion requirement from 0.3.4 to 0.4.0
2022-09-12 19:54:39 +02:00
dependabot[bot] 0b573efb6b
Update criterion requirement from 0.3.4 to 0.4.0
Updates the requirements on [criterion](https://github.com/bheisler/criterion.rs) to permit the latest version.
- [Release notes](https://github.com/bheisler/criterion.rs/releases)
- [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bheisler/criterion.rs/compare/0.3.4...0.4.0)

---
updated-dependencies:
- dependency-name: criterion
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-12 08:06:20 +00:00
Daniel Abramov 96f9cb9ad8
Merge pull request #301 from Icelk/master
Make handshake dependencies optional.
2022-09-01 20:42:55 +02:00