Это пример программы hello world из документации Tokio .
use tokio::prelude::*;
#[tokio::main]
async fn main() {
let mut stream = TcpStream::connect("127.0.0.1:6142").await.unwrap();
println!("created stream");
let result = stream.write(b"hello world\n").await;
println!("wrote to stream; success={:?}", result.is_ok());
}
, которая дает мне эту ошибку:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 10061, kind: ConnectionRefused, message: "No connection could be made because the target machine actively refused it." }', src\libcore\result.rs:1165:5
stack backtrace:
.
.
.
Как я могу это исправить