Async I/O in Depth: Iterative TCP Echo Server
Автор: Thomas 🏕
Загружено: 2022-05-27
Просмотров: 3623
                Описание:
                    This series explores Asynchronous I/O in Rust. With this video we implement a simple TCP Echo Server and Client using the TcpListener and TcpStream structs. We start out by covering system architectures, working with the operating system, differences between blocking and non-blocking operations, system calls, computational vs I/O bound applications. We also take a look at libc crate to perform foreign function interface calls to the operating system with syscalls to get an idea of what all the libraries are doing underneath at the lowest level (aside from performing assembly instructions). We understand that all system calls that deal with I/O will typically deal with file descriptors (including stdin and stdout). Finally, after implementing the echo server with a TcpListener and TcpStream client, we take a look at an implementation with libc to create syscalls using the unsafe keyword in order to manage the file descriptor and system calls ourselves. 
NOTE
This is the first video of a series covering async i/o in rust where we will eventually get to creating our own Async Runtime and working with Futures. Stay tuned!
↠ References:
std::net::TcpListener: https://doc.rust-lang.org/std/net/str...
std::net::SocketAddr: https://doc.rust-lang.org/std/net/enu...
std::net::TcpStream: https://doc.rust-lang.org/std/net/str...
std::io::Stdin: https://doc.rust-lang.org/std/io/stru...
std::io::Stdout: https://doc.rust-lang.org/stable/std/...
socket: https://man7.org/linux/man-pages/man2...
setsocketopt: https://linux.die.net/man/2/setsockopt
bind: https://man7.org/linux/man-pages/man2...
listen: https://man7.org/linux/man-pages/man2...
connect: https://man7.org/linux/man-pages/man2...
write: https://man7.org/linux/man-pages/man2...
read: https://man7.org/linux/man-pages/man2...
close: https://man7.org/linux/man-pages/man2...
libc crate: https://github.com/rust-lang/libc
↠ Patreon: https://www.patreon.com/nyxtom?fan_la...
↠ Dotfiles: https://github.com/nyxtom/dotfiles
↠ Twitter: @nyxtom   / nyxtom  
↠ Channel:    / nyxtom  
Cheers! 🍻
🦀  #rust #rustlang #rustprogramming #exercises #programming                
                
Повторяем попытку...
 
                Доступные форматы для скачивания:
Скачать видео
- 
                                Информация по загрузке: