ComplexSpaces
e935f4078b
Add tokio-rustls-manual-roots feature
...
This allows dropping the forced dependency on webpki-roots when using
a custom connector that provides its own TLS roots instead.
2 years ago
Benoît CORTIER
068a9a6984
Fix poll_flush on closed connection
...
Flushing when there is nothing to send anymore should succeed.
Relevant code in `tungstenite` crate code:
e5efe537b8/src/protocol/mod.rs (L390)
2 years ago
Sebastian Dröge
aed66e94c5
Fix compilation of tests without handshake feature
2 years ago
Icelk
1dd92fc13a
Make handshake dependencies optional.
2 years ago
Daniel Abramov
38bfaa4f10
Implement the `FusedStream` along with `Stream`
3 years ago
Daniel Abramov
3c150d1174
Make the semantics of `Stream` more reasonable
...
Closes https://github.com/snapview/tokio-tungstenite/issues/200
3 years ago
Benoît CORTIER
72fb249d8f
Refactor similar conditional branches in `WebSocketStream::poll_close`
3 years ago
Sebastian Dröge
1a7ac567ea
Fix a couple of minor clippy warnings
3 years ago
Benoît Cortier
a4546af441
Fix typo in comment
...
Co-authored-by: Sebastian Dröge <slomo@coaxion.net>
3 years ago
Benoît CORTIER
4dd8888a9d
Fix `poll_close` returning WouldBlock error kind
3 years ago
Andy Russell
a1521f4c09
strip IPv6 brackets before connecting to IP
3 years ago
Sebastian Dröge
ee6c24d327
Update to tungstenite 0.15
3 years ago
QiuJiangkun
44a59b66e5
conditionally disable verbose logging ( #92 )
...
* conditionally disable verbose logging
* disable logging setting context ... conditionally
* no verbose logging by default
4 years ago
Yusuf Bera Ertan
e89b49c16d
feat: add two new features to allow using webpki-roots or rustls-native-certs
4 years ago
Sebastian Dröge
1170f4e080
Fix a couple of clippy warnings
4 years ago
Sebastian Dröge
24cae74484
Update to tungstenite 0.13
...
And improve error mapping.
Fixes https://github.com/sdroege/async-tungstenite/issues/79
4 years ago
Mathias Koch
286dd662b6
Add support for tokio-rustls
4 years ago
Josh Matthews
00fa09ce37
Add openssl support.
5 years ago
Philippe Normand
be83431c2f
gio: Add Send implementation to IOStreamAsyncReadWrite
...
This is a wrapper for GSocketConnection, which should be OK to share across
threads.
5 years ago
Sebastian Dröge
8738c887c0
Add public type aliases for the stream types used by the various client-side functions
...
Fixes https://github.com/sdroege/async-tungstenite/issues/35
5 years ago
Sebastian Dröge
be8e9d898d
Don't declare internal port function when only the async-tls feature is enabled
...
warning: function is never used: `port`
--> src/lib.rs:381:15
|
381 | pub(crate) fn port(
| ^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: 1 warning emitted
5 years ago
Naja Melan
e131ec4e8a
Expose the configuration of the websocket connection.
...
Allows wrapper types to respect max_message_size.
5 years ago
Sebastian Dröge
29e528d1bc
Switch from deprecated tokio-tls to tokio-native-tls
5 years ago
Marcin Pajkowski
9b5b065b1b
Derive `Debug` for `WebSocketStream<S>`
5 years ago
Sebastian Dröge
5c594c0549
Forward handshake errors directly instead of wrapping them in a Other IO error
...
This allows getting HTTP status codes back to the caller, for example,
and allows proper handling of handshake errors.
5 years ago
Erich Gubler
d4eea7211c
build(deps): minimize unnecessary dependencies by using `futures-{channel,io,util}` directly instead of `futures` outside of tests/examples
5 years ago
Naja Melan
249dbf7f2d
Advertise not using unsafe code.
5 years ago
Naja Melan
6015bf5f7b
error.description is deprecated as of current nightly.
5 years ago
Sebastian Dröge
a65c53b6cd
Fix clippy warning about ok_or() followed by a function call
...
warning: use of `ok_or` followed by a function call
--> src/lib.rs:379:10
|
379 | .ok_or(tungstenite::Error::Url("Url scheme not supported".into()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| tungstenite::Error::Url("Url scheme not supported".into()))`
5 years ago
Sebastian Dröge
3a994e6e3b
Update to tungstenite 0.10
...
Partially based on tungstenite commits
- 46dfd9ed3ee75b0261e9f5f71c8e70492407248b by Alexey Galakhov
- 31010fd636b3edc683199e3182ea34d799118d5b by Alexey Galakhov
5 years ago
wolf4ood
0c749aeeb0
Restored stream pub visibility
5 years ago
Sebastian Dröge
c2ff77b446
Refactor features and optional API and add support for tokio/gio async runtimes
5 years ago
Sebastian Dröge
c647de44ef
Add client_async_tls and connect_async variants with WebSocketConfig parameter
5 years ago
Sebastian Dröge
b4d5a9e84e
Add API for connecting and creating clients with a custom TLS connector
...
Fixes https://github.com/sdroege/async-tungstenite/issues/2
5 years ago
Sebastian Dröge
fb8bbca9ed
Add optional support for TLS via async-native-tls instead of async-tls (rustls)
...
Can be enabled with the "native-tls" feature instead of just "tls".
5 years ago
Sebastian Dröge
ec71882145
Don't leak AllowStd type outside the crate
...
It's not needed as public API and an implementation detail.
5 years ago
Sebastian Dröge
ae0a324116
Remove custom WebSocketStream::close() implementation
...
Instead simply send an owned Closed message. This simplifies the code
and among other things also handles errors like WouldBlock correctly
instead of handling them like a real error.
5 years ago
Sebastian Dröge
e86a2f4ae7
Remove WebSocketStream::send()
...
The same functionality is already provided via StreamExt::send() and
unlike the custom implementation it handles WouldBlock correctly and not
as an error.
5 years ago
Sebastian Dröge
93d4b35d4d
Remove unused #[pin_project] attribute
5 years ago
Sebastian Dröge
9f3a1ee30b
Add proxy waiters to allow the Stream to trigger AsyncWrite operations
...
As a side effect also gets rid of unsafe code and raw pointers.
We have the problem that external read operations (i.e. the Stream impl)
can trigger both read (AsyncRead) and write (AsyncWrite) operations on
the underyling stream. At the same time write operations (i.e. the Sink
impl) can trigger write operations (AsyncWrite) too.
Both the Stream and the Sink can be used on two different tasks, but it
is required that AsyncRead and AsyncWrite are only ever used by a single
task (or better: with a single waker) at a time.
Doing otherwise would cause only the latest waker to be remembered, so
in our case either the Stream or the Sink impl would potentially wait
forever to be woken up because only the other one would've been woken
up.
To solve this we implement a waker proxy that has two slots (one for
read, one for write) to store wakers. One waker proxy is always passed
to the AsyncRead, the other to AsyncWrite so that they will only ever
have to store a single waker, but internally we dispatch any wakeups to
up to two actual wakers (one from the Sink impl and one from the Stream
impl).
5 years ago
Atul Bhosale
eb2c63ee73
Format code using 'cargo fmt'
5 years ago
Danny Browning
6cdf141a02
Build with no default features, examples still require default features
5 years ago
Sebastian Dröge
b76d8cbc03
Port/rename to async-std / async-tungstenite
5 years ago
Danny Browning
1cbac51d14
Bringing splitting back
5 years ago
Danny Browning
46ac847977
Use tokio built in dns
5 years ago
Danny Browning
3821e0952a
Tokio 0.2 Conversion
...
Update to use tokio 0.2 ecosystem to integrate with tungstenite.
5 years ago
Artem Vorotnikov
9bd5f01784
Upgrade to Rust 2018, format the code
5 years ago
Naja Melan
380f531d86
Fix some clippy warnings about unnecessary closures for more concise code
5 years ago
Daniel Abramov
e2cdf11bc8
Update to the latest `tungstenite-rs` version
6 years ago
Jeffrey Esquivel S
eda57a012c
Implement support to get the peer address
6 years ago