getting started with tokio by creating an async tcp echo server | rust tokio tutorial | rustlang



getting started with tokio by creating an async tcp echo server | rust tokio tutorial | rustlang

getting started with tokio by creating an async tcp echo server | rust tokio tutorial | rustlang

chris gives a deep dive into using Tokio for asynchronous rust programming within the Rust Language (rustlang). Tokio is a key rust framework that is used as an asynchronous runtime that powers many web frameworks such as axum, actix-web or rocket.rs. by understanding tokio, this will give you a deeper understanding of those frameworks and how they’re built (and how you use them) as well as understanding async await when performing any i/o bound programming.

In this video we start by firing up a tcp stream based echo server using out of the box tools such as netcat and socat and then we slowly replace those tools with an echo client and server that we will code up in rust lang. we start initially with stdnet libraries and then we replace those libraries with tokio showing how we can use async await and tokio as an asynchronous runtime to achieve performance and coding benefits through easy use of futures and concurrent programming.

Source Code available at
https://github.com/chrishayuk/chrishayuk-monorepo/tree/main/apps

Chapters

00:00 – introduction
01:41 – using netcat as an echo client
02:05 – connecting to tcpbin.com as an echoserver
03:05 – launching our own echo server with socat
05:09 – creating a rust echo client using stdnet
21:25 – creating a rust echo client using tokio
36:00 – creating a rust echo server with stdnet
1:00:41 – creating a rust echo server with tokio
1:21:00 – conclusion .

Comments are closed.