websockets-rs / websockets-rs/rust-websocket

ssl-client dont work

Open
#255 6 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.6k
Forks
225
PR merge metrics
No merged PRs in 30d

Description

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, _)| {
    |          ^^^^^^^^
    | 

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the example's Cargo.toml and src/main.rs, then compare the declared futures and tokio versions with the APIs used in the imports and runtime setup. Reproduce the reported compiler errors and determine the compatible example configuration; done means the SSL client example builds and runs without these errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.