chore: update the documentation

Fixes #280.
This commit is contained in:
Daniel Abramov 2022-04-19 19:39:19 +02:00
parent bb546acd76
commit b8ccbcf2a1
2 changed files with 6 additions and 3 deletions

View File

@ -69,8 +69,8 @@ features are available:
Choose the one that is appropriate for your needs.
By default **no TLS feature is activated**, so make sure you use `native-tls` or
`rustls-tls` feature if you need support of the TLS.
By default **no TLS feature is activated**, so make sure you use one of the TLS features,
otherwise you won't be able to communicate with the TLS endpoints.
There is no support for permessage-deflate at the moment, but the PRs are welcome :wink:

View File

@ -30,7 +30,8 @@ use crate::{
/// equal to calling `connect()` function.
///
/// The URL may be either ws:// or wss://.
/// To support wss:// URLs, feature `native-tls` or `rustls-tls` must be turned on.
/// To support wss:// URLs, you must activate the TLS feature on the crate level. Please refer to the
/// project's [README][readme] for more information on available features.
///
/// This function "just works" for those who wants a simple blocking solution
/// similar to `std::net::TcpStream`. If you want a non-blocking or other
@ -39,6 +40,8 @@ use crate::{
/// This function uses `native_tls` or `rustls` to do TLS depending on the feature flags enabled. If
/// you want to use other TLS libraries, use `client` instead. There is no need to enable any of
/// the `*-tls` features if you don't call `connect` since it's the only function that uses them.
///
/// [readme]: https://github.com/snapview/tungstenite-rs/#features
pub fn connect_with_config<Req: IntoClientRequest>(
request: Req,
config: Option<WebSocketConfig>,