Commit Graph

45 Commits

Author SHA1 Message Date
Alex Bakon
691b1e712f Merge permessage-deflate support into master 2025-09-12 13:44:39 -04:00
Alex Bakon
bb7bfd3287 Enable autobahn testing with deflate support
Based on work by Benjamin Swart <Benjaminswart@email.cz>
2025-09-12 13:32:36 -04:00
Alex Butler
9482a478f5
Reduce Error size 136 -> 32 (#511)
* Box Error::Http

Reduce Error size 136 -> 56

* Box Error::WriteBufferFull

Reduce Error size 56 -> 40

* Box ProtocolError::InvalidHeader, TlsError::Native, TlsError::Rustls

Reduce ProtocolError size 40 -> 16
Reduce TlsError size 64 -> 16
Reduce Error size 40/64 -> 32

* Update changelog

* Make the code worse so users can use old rustc from 2022
2025-07-24 12:50:33 +02:00
Constantin Nickel
7f3d46eaff Fix clippy warnings: Inline format! args 2025-07-09 14:10:39 +02:00
Benjamin
255aaa2c0c add more details for utf8 errors for debugging
Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
2025-04-09 16:39:50 +02:00
Alex Butler
84bfbff919 Add WebSocketConfig::read_buffer_size default 128 KiB
Make `WebSocketConfig` non-exhaustive & add builder style construction fns
Remove deprecated `WebSocketConfig::max_send_queue`
2024-12-15 12:24:57 +01:00
Alex Butler
6c5aeb2418 UtfPayload 2024-12-14 18:07:10 +01:00
nickelc
2bc5387868
Fix clippy warnings & add CI build job for clippy (#445)
* Fix clippy warnings

- `clippy::manual_pattern_char_comparison`
- `clippy::needless_borrows_for_generic_args`
- `clippy::range_plus_one`
- `clippy::redundant_closure_for_method_calls`
- `clippy::ref_binding_to_reference`
- `clippy::semicolon_if_nothing_returned`
- `clippy::single_char_pattern`
- `clippy::uninlined_format_args`

- allow `clippy::result_large_err`
- allow `clippy::large_enum_variant`

* ci: add build job for clippy
2024-09-08 15:35:21 +02:00
Hamir Mahal
1617041416
style: simplify string formatting (#435) 2024-08-13 17:10:44 +02:00
n4n5
c21281abbc
Make url as feature and bump version (#419)
* make url usage as feature

* bump version

* fix: clearer test

* Update Cargo.toml

Co-authored-by: Daniel Abramov <inetcrack2@gmail.com>

* Update CHANGELOG.md

Co-authored-by: Daniel Abramov <inetcrack2@gmail.com>

---------

Co-authored-by: Daniel Abramov <inetcrack2@gmail.com>
2024-05-13 21:57:54 +02: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
Alex Butler
0203a1849b Remove send_queue, use out_buffer instead 2023-05-24 18:42:09 +01: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
Kirill A. Khalitov
469aaf37be feature: Raw fragment message 2021-11-22 20:33:42 +03:00
Dominik Nakamura
32450ae5af
Add a connector to configure TLS config 2021-07-23 21:26:44 +09:00
Adam Bezecny (DHL IT Services)
9f292d21fc minor fixes 2020-12-01 19:19:45 +01:00
Adam Bezecny (DHL IT Services)
a9adb42343 server_allow_unmasked changed from Option<bool> to bool 2020-11-27 21:38:33 +01:00
Adam Bezecny (DHL IT Services)
0121bf9682 WebSocketConfig extended to allow accepting unmasked client frames 2020-11-26 20:51:50 +01:00
Daniel Abramov
96d9eb75e5 chore: apply fmt to the whole project 2020-11-17 12:40:52 +01:00
Alexey Galakhov
010266e001 test: autobahn: add strict error reporting
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
2020-01-13 22:22:42 +01:00
Sebastian Dröge
88760b8b59 Fix various clippy warnings 2019-11-24 18:05:40 +01:00
Sebastian Dröge
f659af4493 Update examples to compile again 2019-11-24 18:05:40 +01:00
Artem Vorotnikov
cbf80ecc76
Edition 2018, formatting, clippy fixes 2019-08-26 21:05:24 +03:00
Alexey Galakhov
758c522b31 travis: add automated autobahn tests
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
2019-05-17 01:30:41 +02:00
Alexey Galakhov
f4769a950c example: trivial: init logger in server example
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
2019-05-14 02:13:35 +02:00
Alexey Galakhov
6f132208ee server: let callback return HTTP error messages
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
2019-05-04 02:15:43 +02:00
Daniel Abramov
c8c3d6290d Make Close part of the Message enum 2019-02-07 14:26:16 +01:00
Daniel Abramov
3a58069db2 Create helpers for config-like functions
As suggested by @agalakhov
2018-06-26 11:12:57 +02:00
Daniel Abramov
00303fa60c Make the websocket configurable 2018-05-25 10:41:16 +02:00
Sean Schwartz
66d2c15f2d Derive Debugs
Deny missing debug and resolve resulting errors to satisfy:
https://rust-lang-nursery.github.io/api-guidelines/debuggability.html#all-public-types-implement-debug-c-debug

Requires updated input_buffer pushed to crates.io:
 - Resolved build errors by using github version of code until new version available on crates.io

Upgrade env_logger dev-dependency to v0.5.3
 - Removed unwrap call from env_logger::init()  as it is no longer needed.
2018-01-21 10:36:48 -06:00
Alexey Galakhov
3091d11566 callback static dispatch
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
2017-10-09 10:36:12 +02:00
Daniel Abramov
41dfc3c506 Add server.rs example to the examples section 2017-07-28 15:24:16 +02:00
Daniel Abramov
5982d4094d Update README and examples 2017-07-28 14:37:21 +02:00
Daniel Abramov
44a15c9eab Implements #6 (client/server headers access) 2017-07-28 14:36:24 +02:00
Daniel Abramov
f34c488217 Add basic support for examining headers (#6) 2017-07-28 14:35:42 +02:00
Alex Crichton
9f6f42766e Add Ping and Pong variants to Message
This'll allow removal/deprecation of the `send_ping` custom method but also
allow applications to react to `Pong` messages as appropriate.

Closes #16
2017-07-25 14:36:42 -07:00
Alexey Galakhov
66e30b2767 Return close frame with ConnectionClosed
This is a breaking change, thus bump the API version.

Closes: #10

Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
2017-04-03 21:21:28 +02:00
Alexey Galakhov
ac580a666b Reexport useful components
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
2017-03-17 15:57:12 +01:00
Alexey Galakhov
b7557f1baa refactor: make handshake completely async 2017-03-13 19:17:05 +01:00
Alexey Galakhov
345501d5f7 trivial: rename agent to "Tungstenite" 2017-02-03 22:15:17 +01:00
Alexey Galakhov
838c8e7ea8 Rename the library to "tungstenite" 2017-02-01 10:01:08 +01:00
Alexey Galakhov
7dccc51277 server: implement server 2017-01-31 21:07:42 +01:00
Alexey Galakhov
caba37c41e trivial: fix client example 2017-01-31 19:22:08 +01:00
Alexey Galakhov
e63f594a14 Initial commit, mostly working client 2017-01-30 10:22:39 +01:00