What is the difference between tokio_core and tokio?

What is the difference between tokio and tokio_core?
I am using tokio runtime and I need to use connect_stream from tokio_core so I am a bit confused

The tokio-core crate is a very very old and deprecated version of Tokio. The current version is tokio version 0.2.x.

If you're trying to create a Tokio TcpStream from a manually configured socket, the steps should be socket2::Socket::into_tcp_stream()tokio::net::TcpStream::from_std(). Don't use tokio-core at all.

2 Likes

thank you all

@NikosEfthias Note that this exists: https://docs.rs/tokio/0.2.22/src/tokio/net/tcp/stream.rs.html#198-220

1 Like