Это видео недоступно.
Сожалеем об этом.

🌐 Network Programming in Rust - Building a TCP Server

Поделиться
HTML-код
  • Опубликовано: 15 авг 2024
  • 📺 Welcome to another exciting Rust programming tutorial!
    In this video, we'll explore the fundamentals of networking in Rust by building a simple TCP server. We'll walk you through the code snippet provided, explaining each key component and step along the way. Let's get started!
    ⚠️ It’s very easy to help the channel ⚠️
    ➊ Like 👍 or 👎 the video
    ➋ Write a comment 💬 under the video (I answer almost everyone)
    ➌ Send video ✉️ to friends via social networks
    ➍ Watch the rest of the videos 🎥 on the channel.
    ✔️Every completed item makes the channel better!
    Thanks friends! 🤝 🤗 👐
    ⏱️ Timestamps:
    00:00 - Introduction
    01:07 - ABCs of Networking
    03:32 - Code Explanation & Walkthrough
    18:58 - Testing and debugging
    20:01 - Handling Client Connections
    21:23 - Outro
    🔗 Code Snippet:
    You can find the code used in this tutorial on GitHub: github.com/Bek...
    In this Rust networking tutorial, you will learn:
    1️⃣ How to import necessary modules from the Rust standard library for networking.
    2️⃣ Handling client connections using the handle_client function, which reads data from clients, processes it, and sends a response.
    3️⃣ Binding a TCP listener to address "127.0.0.1:8080" and listening for incoming connections.
    4️⃣ Using multithreading to handle multiple client connections concurrently.
    By the end of this video, you'll have a clear understanding of how to create a basic TCP server in Rust and how to handle client requests. Don't forget to like, subscribe, and hit the notification bell to stay updated with more Rust programming tutorials!
    🔗 GitHub Repository:
    github.com/Bek...
    🔗 Readme.md: github.com/Bek...
    🔗 Telegram Channel: t.me/bekbrace
    🔗 Instagram: / bek_brace
    🔗 Twitter: / bekbrace
    #RustProgramming #NetworkingInRust #TCP #RustTutorial #RustServer #RustNetworkingTutorial #LearnRust #programmingtutorial
    Join this channel to get access to perks:
    / @bekbrace

Комментарии • 54

  • @dantesbytes
    @dantesbytes 7 месяцев назад +16

    the fact that you explained everything line by line is priceless, I'm confindent that you wrote this yourself unlike 99% of the vidoes i come across on youtube seems like most of them don't have clue as to what they are teaching .

    • @BekBrace
      @BekBrace  7 месяцев назад

      Thanks so much for these words🙏. Indeed I've written it myself 🙂

  • @orrenjenkins289
    @orrenjenkins289 7 месяцев назад +3

    5:15 std::io::Read and std::io::Write are traits in the std::io module

  • @anashe5417
    @anashe5417 3 месяца назад

    this video it's just perfect, I have no words to describe how amazing this is. Thanks a lot and the way you teach these things is just incredible.

    • @BekBrace
      @BekBrace  3 месяца назад

      Thank you very very much for your kind words ❤️🙏 Your feedback is what pushes me forward to create more and more content | ••• Thank You !!!

  • @anthonywilliams9334
    @anthonywilliams9334 5 месяцев назад +1

    Excellently executed tutorial. Blow by blow, line by line. Subscribed.

    • @BekBrace
      @BekBrace  5 месяцев назад

      Thank you so much, Anthony 🙏🙂

  • @MPAXEL
    @MPAXEL 10 месяцев назад +2

    can't wait :)

    • @BekBrace
      @BekBrace  10 месяцев назад

      See You :)

  • @AchroDev
    @AchroDev 2 месяца назад

    Love the video! Thanks for sharing your knowledge. I think it would have been better for the address to have been stored as a variable. This helps with a couple of things, but mostly saving you from re-writing the same string over and over.
    let address = "127.0.0.1:8080";
    let listener = TcpListener::bind(address).expect("Failed to bind to address: {address}");
    println!("Server listening on {}", address);

  • @symshark
    @symshark 5 месяцев назад +1

    This was great, looking forward for the Tokio tutorial!

  • @simonkalu
    @simonkalu 5 месяцев назад +1

    Wow! very precise and clear.

  • @bEan-cf7mx
    @bEan-cf7mx 7 месяцев назад +4

    Can you make a video about Tokio please :)

    • @BekBrace
      @BekBrace  6 месяцев назад +1

      Certainly )) Thanks for suggestion

  • @chaudharypraveen98
    @chaudharypraveen98 5 месяцев назад +1

    Thank you so much for depth knowledge

    • @BekBrace
      @BekBrace  5 месяцев назад

      I am so glad you enjoyed it

  • @xsamuelx3603
    @xsamuelx3603 10 месяцев назад +2

    Amazing video, my friend :)

    • @BekBrace
      @BekBrace  10 месяцев назад

      Thank you very much 🙏🙏🙏

  • @abayaz61
    @abayaz61 6 месяцев назад +1

    amazing content. please continue to rust series

    • @BekBrace
      @BekBrace  6 месяцев назад

      Hey! Thank you so much: More Rust to come!

  • @mohaniya15
    @mohaniya15 10 месяцев назад +1

    Great video, I have just started with Rust videos on my channel, this really helped me.

    • @BekBrace
      @BekBrace  10 месяцев назад

      Great my friend !
      Cool channel by the way, good luck in your journey 😀

  • @svetlana9699
    @svetlana9699 10 месяцев назад +2

    🔥🔥🔥

    • @BekBrace
      @BekBrace  10 месяцев назад

      Thank you 😊😊😊

  • @nalayak862
    @nalayak862 9 месяцев назад +1

    i am just three days into rust and i will still watch it

    • @BekBrace
      @BekBrace  9 месяцев назад

      Good luck and happy coding

  • @VasilMagaranov
    @VasilMagaranov 3 месяца назад

    What happens, if the buffer is not large enough to read the whole message from the stream? I tried reading twice and concatenate the results into the string, but it didn’t seem to work…

  • @the_player_is_ready
    @the_player_is_ready 4 месяца назад +1

    That's so interesting 😁

    • @BekBrace
      @BekBrace  4 месяца назад

      Thank you very much 👋☺️

  • @HumanoidTyphoon91
    @HumanoidTyphoon91 3 месяца назад +1

    Hate to be that guy, but what's your color theme? It looks amazing!

    • @BekBrace
      @BekBrace  3 месяца назад

      No problem at all, my friend anything you want 🙂 the theme is VIM dark

  • @BRISKLYHIDDEN
    @BRISKLYHIDDEN 10 месяцев назад +1

    Slam Dunk 🏀

  • @cahwardev9804
    @cahwardev9804 10 месяцев назад +1

    Amazing video! What is the font and the color theme that used in the video?

    • @BekBrace
      @BekBrace  10 месяцев назад

      Thank you.
      Theme: Bearded Theme Black & Ruby
      Font: Caskadiya Cove

  • @jaysoni93
    @jaysoni93 9 месяцев назад +2

    When is the next video coming In this series ?

    • @BekBrace
      @BekBrace  9 месяцев назад

      Next Month, there will be a new video in the series, thank you for your patience.

  • @xsamuelx3603
    @xsamuelx3603 10 месяцев назад +1

    What's your terminal setup?

    • @BekBrace
      @BekBrace  10 месяцев назад

      Yo .. check out my video: PowerShell Terminal Setup - all explained there/ peace

  • @8rupees718
    @8rupees718 4 месяца назад +1

    What extentions do you use for rust?

    • @BekBrace
      @BekBrace  4 месяца назад +1

      just Rust Analyzer

    • @8rupees718
      @8rupees718 4 месяца назад

      @@BekBrace Thankyou Very much

    • @BekBrace
      @BekBrace  4 месяца назад +1

      Anytime 😊

  • @shivanshuraj7175
    @shivanshuraj7175 23 дня назад

    How you can handle more than one connection without a loop encapsulating tcp incomming?....

    • @xtremistdude92
      @xtremistdude92 17 дней назад

      Create separate threads to handle each client

  • @skyeplus
    @skyeplus 5 месяцев назад

    Hi. Isn't [0; 1024] mean 1024 ints? Or the type is being adjusted to u8 after it's use in read()?

    • @BekBrace
      @BekBrace  5 месяцев назад +1

      So, when you see 0; 1024, think of it as a space reserved for 1024 elements. It's like having a box with 1024 slots, ready to store stuff. You know what I mean ? And what type of stuff goes in those slots depends on what you're doing with them.

    • @skyeplus
      @skyeplus 5 месяцев назад

      ​@@BekBrace​I found the answer: "Unsuffixed literal, their types depend on how they are used". So 0 literal retroactively binds to u8 a fine grained type upon buffer use in read().

  • @harbi.delikanli
    @harbi.delikanli 10 месяцев назад

    Awesome video! May I ask the font name and color theme name? Thanks.

    • @BekBrace
      @BekBrace  10 месяцев назад +1

      Thank you!
      Theme: Bearded Theme Black & Ruby
      Font: Caskadiya Cove

  • @asimwelandry9215
    @asimwelandry9215 7 месяцев назад

    can you makea vid on how to make your device a priority and if possible involving the use of rustlang
    if it get uploaded can you please tag me or forward link as a reply

    • @BekBrace
      @BekBrace  7 месяцев назад

      Hi and thank you for this question.
      So, to prioritize your device using Rust, you can leverage Rust's thread module to set thread priorities through std::thread::Builder.
      Alternatively, for more granular control, use the libc crate to interact with the operating system API, allowing you to set process or thread priorities directly. Remember to test your application, monitor system behavior, and adjust priorities cautiously to avoid adverse effects on overall system performance and stability.
      Have I answered your question ?