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

ssl-client dont work #255

Open
ddkclaudio opened this issue Sep 4, 2020 · 6 comments
Open

ssl-client dont work #255

ddkclaudio opened this issue Sep 4, 2020 · 6 comments

Comments

@ddkclaudio
Copy link

ddkclaudio commented Sep 4, 2020

Example for websocket using SSL does not work, can someone help me?

Cargo.toml

[dependencies]
websocket = "0.26.2"
futures = "0.3.5"
tokio = "0.2.22"

Erro

error[E0432]: unresolved import `futures::sync`
 --> src/main.rs:8:14
  |
8 | use futures::sync::mpsc;
  |              ^^^^ help: a similar path exists: `websocket::futures::sync`

error[E0433]: failed to resolve: could not find `current_thread` in `runtime`
  --> src/main.rs:18:55
   |
18 |     let mut runtime = tokio::runtime::current_thread::Builder::new()
   |                                                       ^^^^^^^ not found in `tokio::runtime::current_thread`

error: the `and_then` method cannot be invoked on a trait object
   --> src/main.rs:52:10
    |
52  |         .and_then(|(duplex, _)| {
    |          ^^^^^^^^
    | 
@vi
Copy link
Member

vi commented Sep 4, 2020

Looks like you are using futures 0.3 / tokio 0.2. rust-websocket is currently based on old pre-async/await tokio 0.1 world.

@dzcpy
Copy link

dzcpy commented Nov 17, 2020

@vi Is there any plan to rewrite this module using futures 0.3 / tokio 0.2 probably also with async/await?

@vi
Copy link
Member

vi commented Nov 17, 2020

@dzcpy Not sure.

I'm going to evaluate and try out tokio-tungstenite and if it suits the needs for which I got into the whole rust-websocket business then maybe it would be the proper time to officially discontinue rust-websocket project and maybe eventually yield the "websocket" crate name to Tungstenite project.


Are there any important features present in rust-websocket that tungstenite / tokio-tungstenite doesn't cover?

@vi
Copy link
Member

vi commented Nov 17, 2020

@ddkclaudio Have you eventually solved your WebSocket needs with this or other library?

@dzcpy
Copy link

dzcpy commented Nov 20, 2020

@dzcpy Not sure.

I'm going to evaluate and try out tokio-tungstenite and if it suits the needs for which I got into the whole rust-websocket business then maybe it would be the proper time to officially discontinue rust-websocket project and maybe eventually yield the "websocket" crate name to Tungstenite project.

Are there any important features present in rust-websocket that tungstenite / tokio-tungstenite doesn't cover?

Or how about async-tungstenite?
https://github.com/sdroege/async-tungstenite

@vi
Copy link
Member

vi commented Nov 20, 2020

@dzcpy Maybe async-tungstenite. I haven't yet reserched about Tungstenite and how its variations related to each other.

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

No branches or pull requests

3 participants