Networking in C++ Part #1: MMO Client/Server, ASIO & Framework Basics

Sdílet
Vložit
  • čas přidán 24. 07. 2024
  • In this series, I use ASIO to create a portable, reusable, simple and flexible framework for general purpose client/server applications in C++. This video shows how to setup ASIO, then explores some of the challenges networking presents in general, before outlining the framework and starting to implement the basic components of it. Ultimately this series will yield a simple MMO game.
    Source: github.com/OneLoneCoder/Javid...
    Patreon: / javidx9
    CZcams: / javidx9
    / javidx9extra
    Discord: / discord
    Twitter: / javidx9
    Twitch: / javidx9
    GitHub: www.github.com/onelonecoder
    Homepage: www.onelonecoder.com
  • Věda a technologie

Komentáře • 922

  • @javidx9
    @javidx9  Před 3 lety +171

    For all those unconvinced it can work, please download and try the prototype project here! onelonecoder.itch.io/meaningless-cog

    • @Zaneris
      @Zaneris Před 3 lety +17

      Decided to provide some tea for this quality content ;) Keep up the good work.

    • @javidx9
      @javidx9  Před 3 lety +10

      Thank you Zaneris! Much appreciated!

    • @javidx9
      @javidx9  Před 3 lety +16

      Yeah asio comes with ssl objects you can use to negotiate https. A bit too complex for a simple introduction 😁

    • @Ryan-xq3kl
      @Ryan-xq3kl Před 3 lety

      Ive always been interested in building a mmo project over a long period of time. Is it possible to use this method for high concurrency on a 3D client?

    • @huberthancock2661
      @huberthancock2661 Před 3 lety +1

      thanks for all the work you do! as someone learning c++, you are truly helpful thank you

  • @comment1652
    @comment1652 Před 3 lety +777

    I have no idea what i'm watching, but thank you bearded man for the knowledge.

    • @javidx9
      @javidx9  Před 3 lety +167

      Best comment ever XD

    • @mattmurphy1065
      @mattmurphy1065 Před 3 lety +12

      I work in IT, and the only thing I understood was the networking lol

    • @soundbreaker2485
      @soundbreaker2485 Před 3 lety +1

      HTTPS changed the strings being sent in plain text though

    • @williamgomez6087
      @williamgomez6087 Před 3 lety +1

      You have to see "Hands on Machine Learning whit python"...

    • @devhonk1722
      @devhonk1722 Před 3 lety

      @@LockeIProd and that does not count from 1 lmao

  • @filmcase1683
    @filmcase1683 Před 3 lety +581

    This man will always be the person I go to for difficult c++ programs

    • @superscatboy
      @superscatboy Před 3 lety +26

      It's a real shame he refuses to use modern C++ idioms and techniques.

    • @qx-jd9mh
      @qx-jd9mh Před 3 lety +8

      @@superscatboy Cniles are set in their ways

    • @superscatboy
      @superscatboy Před 3 lety +4

      @@qx-jd9mh True. I've never understood why though, it's not exactly hard to keep up with the evolution of the language - it progresses at a glacial rate after all.

    • @qx-jd9mh
      @qx-jd9mh Před 3 lety +19

      @@superscatboy Imagine not using RAII, smart pointers, l/r values/move semantics, lambdas, auto/delctype, default/deleted functions, initializer lists, strongly typed enums, static assertions, constexpr, or variadic templates/folding expressions. You had plenty of time to learn OO design patterns with C++03 and before. I guess people who learned systems programming with C don't want to learn higher level abstractions.

    • @swapode
      @swapode Před 3 lety +24

      ​@@superscatboy Well, the best modern C++ idiom in most cases probably is to ditch it for Rust ;-)

  • @motbus3
    @motbus3 Před 3 lety +98

    Stop and realize for one moment how great the content OLC has been posting. Really amazing.

  • @DidYouCropThat
    @DidYouCropThat Před 3 lety +63

    I'm a web developer, but always love to see the other side of programming and especially channels that produce advanced materials, not always the "Hello, world" examples.
    Thank you for doing this.

    • @caareystore5058
      @caareystore5058 Před rokem +2

      this video is explanation of how web works under the hood.

  • @Spawnova
    @Spawnova Před 3 lety +89

    For anyone else who's zip file did not match his, he made a small mistake at 3:04 and seemed to imply to download the boost_asio file, but in fact you want the non boost file.

    • @crazypeter113
      @crazypeter113 Před 3 lety +1

      still how can i make my vs work with that?

    • @welcomereality924
      @welcomereality924 Před 3 lety

      @@crazypeter113 check the properties files vscode creates, there must be some sort of parameter for includes iirc

    • @sketburd9360
      @sketburd9360 Před 2 lety

      this ^^^

    • @The_Nelliel
      @The_Nelliel Před 2 lety +1

      Thank you, omg lol I was getting pissed lol

    • @ajaydalal199
      @ajaydalal199 Před rokem

      thanks bro, you saved me a lot of time and headache.

  • @bobarnoldjr.1937
    @bobarnoldjr.1937 Před 3 lety +3

    javidx9 - thanks so much for your videos. I haven't done C/C++ since college 20 years ago. You've definitely re-sparked my interest in C. It was fun putting together a working example of the message buffer from your video. I got started writing games in my teens back in the early 90s but have done business software in my professional career. In college over a Christmas break I recall writing a centipede clone in java. Great stuff! Much appreciated!

  • @HupLOader561
    @HupLOader561 Před 3 lety +1

    You always do something that not any ANY other CZcams programming channel would do. I love that! without you there would probably not be anyone who spends effort into their videos as much as you do. Your the best!

  • @RoryBecker
    @RoryBecker Před rokem +4

    Everything on this channel is Gold. If I'm not interested in it right now, I'm certain I will be at some point.
    Great content... Delivered well... With just the right level of detail... at the perfect pace.

  • @YariRu
    @YariRu Před 2 lety +4

    I watched a lot of teaching videos in my life. Really a lot. But this one, it's the best of all. I like the language, intonation, and speaker's face, all of it brings live to the whole video. I'm impressed.

  • @HitAndMissLab
    @HitAndMissLab Před 3 lety +7

    Thank you for the phenomenal video! + Thank you for not assuming that viewers already know what you know + Thank you for explaining things slowly, one small step at a time. That's the best method.

    • @javidx9
      @javidx9  Před 3 lety +1

      Hey thanks buddy! It's a formula that works.

  • @AmberHearts
    @AmberHearts Před 3 lety

    This is explained in a really easy to digest manner and I'm really happy it showed up in my recommendations.
    If all your videos are of this quality then I have a lot to sit through in the nearest future!
    Great work!

  • @richardvonlehe4581
    @richardvonlehe4581 Před 3 lety +1

    I really appreciate the prep work that went into this video. Specifically I like that you first explore some of the dead ends to help drive home some of the subtleties of asyncronous behavior.

  • @NoxaDreshar
    @NoxaDreshar Před 3 lety +9

    Coder with 10 years of experience here but in other languages such as C# etc. Learning about C++ now and I gotta say your videos are on a very high technical level and you go through them step by step which I really appreciate. Great quality stuff, keep going. Also highly respect your professional skill level - it kinda makes me feel like a dumbass xD

  • @billybest5276
    @billybest5276 Před 3 lety +4

    this was great, can't wait for the rest of the series.

  • @jake3476
    @jake3476 Před 2 lety +1

    A lot of mental effort was clearly put into making this video as informative as it could be. Thank you for your hard work.

  • @DavidDachaDjordjevic
    @DavidDachaDjordjevic Před 3 lety +1

    I am so looking forward to the next parts. I enjoyed so much watching you opening new doors for so many possibilities for a game I have on my mind. Thank you sir! Much love. :)

  • @MarcoBergamin
    @MarcoBergamin Před 3 lety +32

    Really great video!
    Some suggestions/notes:
    In net_message.h
    - use is_trivially_copiable instead of is_standard_layout to check if a datatype can be safely "memcopied"
    In net_tsqueue.h
    - make muxQueue mutable add the 'const' keyword to the methods where applicable.
    - fix push_front and push_back because you are moving a const T& which can't be moved (maybe add push_front(T&&) and push_back(&&) methods for this)
    - (just to increase the portability) use std::lock_guard instead of std::scoped_lock
    In net_connection.h
    - when deriving from std::enable_shared_from_this it is best practice to make the ctor private and add a factory method to create an shared_ptr of that class to be sure you can always call the method shared_from_this without having undefined behaviour or an exception, depending on the c++ version
    In general, I have noticed you always declare the destructor; be aware that when you declare the dtor, the move ctor and move assignment operator are deleted by default and you have to define them again so maybe defining them again could be a good idea.

  • @ahaquer153
    @ahaquer153 Před 3 lety +166

    I don't think I've ever clicked on a video faster

    • @filmcase1683
      @filmcase1683 Před 3 lety +2

      I know, right?

    • @pwnrz8684
      @pwnrz8684 Před 3 lety

      @@filmcase1683 MAIAMAIAMIAMAIAMIAMAIMAIMAIAMIAMAIMA

    • @TheDubleyaC
      @TheDubleyaC Před 3 lety +2

      For real, I don't think I'd be interested in any other channel posting a video with this title/description. However, here it's a 100% must watch.

    • @bruno_kid_
      @bruno_kid_ Před 3 lety +1

      [2]

    • @johnbrodie9815
      @johnbrodie9815 Před 3 lety +1

      same my dude

  • @Kyagara
    @Kyagara Před 3 lety +2

    As someone that loves MMOs, this is something I've always wanted to learn more about, thanks for the video!

  • @gasparRaduB
    @gasparRaduB Před 3 lety

    Reminiscent of an event driven pub sub. A very clean and simple approach to implementing, what is traditionally, a complex problem. As always and as expected, OLC describes everything in a very easy to understand and digest manner. Nicely done.

  • @trobinsoon
    @trobinsoon Před 2 lety +8

    It took me a while to work it out so for those of you with an error that looks something like "undefined reference to `pthread_join`" (I'm on linux by the way).
    I fixed it by using - pthread in the compiling command:
    g++ Main.cpp -I [insert include directory] -o Main -pthread
    Hope this helps (:

  • @SourceCodeDeleted
    @SourceCodeDeleted Před 3 lety +28

    I am really interested to see this !!! Much needed !!!

    • @Zaneris
      @Zaneris Před 3 lety

      Socket/networking tutorials are horrible for the most part with addressing how you should design it for real world applications. So happy this is being covered.

    • @stewartzayat7526
      @stewartzayat7526 Před 3 lety +1

      Your user name gives me anxiety

    • @SourceCodeDeleted
      @SourceCodeDeleted Před 3 lety

      @@stewartzayat7526 Not the first time I have heard this))

    • @deleater
      @deleater Před 3 lety +1

      @@SourceCodeDeleted you make me want to create another account named "Executable Reverse Engineered" lol.

  • @DIDIJEANPHI
    @DIDIJEANPHI Před 3 lety

    Great vid !!! I've been using ASIO for many projects at work. I really love the way you introduced it.

  • @farzadfarzady1282
    @farzadfarzady1282 Před rokem

    Excellent indeed. One of the best modern C++ videos I have seen & you get ASIO thrown in as well. MANY thanks. You are a very cool guy 🙂

  • @mattbrewerton6884
    @mattbrewerton6884 Před 3 lety +27

    I can't keep away from these videos. I've watched and listened to so many of them.
    I don't use C++.

    • @robrick9361
      @robrick9361 Před 26 dny +1

      C++ is for people who like to find problems for their solutions.

  • @MuhammadArshad
    @MuhammadArshad Před 3 lety

    I have never clicked on part 2 of any video series as faster as I did for this one. Thank you so much.

  • @irbaboon1979
    @irbaboon1979 Před 3 lety

    Haven’t touched C/C++ in years to be honest - but the way you describe and explain makes me want to pick it up again for fun. Great videos!

  • @sterdot
    @sterdot Před 3 lety +103

    Coming from a music production background, I was very confused by ASIO in the title...

    • @javidx9
      @javidx9  Před 3 lety +27

      Lol yes, its quite an unfortunate coincidence!

    • @user-tx2si2zp1i
      @user-tx2si2zp1i Před 3 lety

      @@javidx9 I wish there were more tutorials on Steinberg's ASIO, lol

    • @user-yr1uq1qe6y
      @user-yr1uq1qe6y Před 3 lety

      I thought the exact same thing when I saw the title come up.

    • @lucadavidian5441
      @lucadavidian5441 Před 3 lety

      Me too!

    • @foamyrocks665
      @foamyrocks665 Před 3 lety

      Me too. They aren't related? I thought the ASIO audio drivers are based on the concepts shown here from the ASIO library.

  • @bongumsamamba5146
    @bongumsamamba5146 Před 3 lety +21

    this dude makes everything looks simple

  • @Adrian_Fleck
    @Adrian_Fleck Před 3 lety

    In my opinion really the best c++ and programming in general Tutorials out there, I know its a big statement, but I´ve watched a lot of tutorials and read a lot of them.

  • @wowLinh
    @wowLinh Před 3 lety +1

    Once again you managed to amaze me. At the beginnig I thought you were going to show and explain some standard socket programming, and have in the end the typical mini-chat server and client program. However I was completely wrong, and I am glad. I did not know of ASIO at all, and I simply loved your net implementation. Of course, your explanations pure gold. Very clear. Probably the best channel I am subscribed to. Congratulations once again.

    • @javidx9
      @javidx9  Před 3 lety

      Hi wowLinh - yeah, i really want to avoid the traditional means of describing this architecture, its just boring :D

  • @juappdev
    @juappdev Před 3 lety +4

    A short while back I reverse engineered an MMO protocol, implementing a replacement server using ASIO. Ended up making heavy use of strands and IO services in order to handle most of the basic queuing. ASIO comes in pretty handy for writing performant servers!
    Prob my greatest frustration however was it's extremely difficult to find a good database library which works well with ASIOs async paradigm, so I ended up just using a threaded connection pool for the actual db queries. Will be interesting to see how you tackle that (if you are using a database in the backend).
    I also felt that it was lacking a bit when it came to actually handling packet data - you've often got to keep track of a lot of state to properly handle rate limiting, writing out packet data, handling bad packets, authentication, and so on. But then again in the long run, probably best to handle that yourself.

    • @radongc115
      @radongc115 Před 3 lety

      Was the mmo protocol for wow? Watching this vid because I've been working on a wow emu recently and I really want to understand the underlying networking going into it. For some reason, mmo networking is fascinating.

  • @doublegdog
    @doublegdog Před 3 lety +7

    love this youtube channel. I am a programmer but am not familiar with C++. You do such a great job explaining concepts for newer programmers! Keep it up!

    • @javidx9
      @javidx9  Před 3 lety +1

      Glad you enjoy it doublegdog!

  • @secretchannel2151
    @secretchannel2151 Před 3 lety

    Nowadays as i grow older im getting more interested in how the worlds that hooked me as a child were developed, specifically MMOS. I hope to take the time to analyze this video deeply in the future. Thanks for the video sir!

  • @-argih
    @-argih Před 3 lety

    I'm installing VS community after 5 years away from coding just to follow this tutorial, i think you have read this a million times but the way you structure the information is not so simplified that it became boring but not so advance that you basically need to be a master in the topic beforehand, after 10 minutes of your video i subscribed to your channel

  • @persoulrpg
    @persoulrpg Před 3 lety +27

    Golden content, yet it's free. Appreciate it people :-)

  • @bruno_kid_
    @bruno_kid_ Před 3 lety +4

    thanks a lot for sharing this content. Info like this is very ward to find, and the majorit times people discourage another developers to do this because it is "hard" or saying "you will never gona do this in you entirely life, do only platform games, cya"

  • @pointyhairedboss1
    @pointyhairedboss1 Před 3 lety +1

    I was looking for a quick intro to asio and this was great. Thank you.

  • @logc1921
    @logc1921 Před 3 lety

    The timing couldn't be perfect! I am making a raycaster with LAN. You are so helpful!

  • @wizardy6267
    @wizardy6267 Před 3 lety +3

    Thanks for the video, lots of useful stuff. One minor thing @ 55:04, m_connection.release() is used here. The release has a return value to return a raw pointer from the unique pointer which is not really used here. Maybe the reset() is good enough for destroying the connection? And I think the video is missing few seconds about adding Send() interface into client_interface.

  • @joidshgoi5435
    @joidshgoi5435 Před 3 lety +4

    For anyone following along with clion + mingw + cmak, be sure to add
    if(MINGW)
    target_link_libraries(learning_asio ws2_32)
    endif()
    to your CMakeLists.txt. Otherwise you'll get a bunch of "undefined reference to xxx..." errors when trying to compile around 9:00 mark.

  • @Dygear
    @Dygear Před 3 lety +1

    Oh no! This video came out 3 days ago, and I was hoping to hop right into Part 2 to see how the rest of the code comes together. I am actually starting to write a client / server infrastructure and this is a VERY good introduction into ASIO.

  • @quentinquadrat9389
    @quentinquadrat9389 Před 3 lety +2

    I did not know ASIO until your video, it looks having a clean API. Nice !

  • @drel9300
    @drel9300 Před 3 lety +3

    Thanks a lot for making this video and that is incredibly helpful! However, I have some questions on the static_assert regarding the trivially copyable types (around 35:00 in the video).
    The first question is that since you mentioned "trivially copyable", I assumed that "is_trivially_copyable" trait should be used to enforce memcpy-safety, but why is "is_standard_layout" used instead in this case?
    The second question is that when you do the serialization/deserialization for data transmitted between different machines, how can we make sure the sizeof(header) or the bitwise representation of the custom data is the same on different platforms with the same code, given that the same structs may have different alignments and paddings? Although in the example you gave I guess a struct containing two uint32_t should generally be packed densely into a 64 bit chunk, I am worried that different compilers may treat other types of POD structs with different bit representation.
    Thanks!

  • @samuelcampbell6559
    @samuelcampbell6559 Před 3 lety +6

    "Oh no _not Boost_"... I laughed out loud.

  • @calogiga
    @calogiga Před 5 měsíci

    I want to thank you for this awesome tutorial. It's the first time that I was able to use and understand asio. Such easy examples are so rare on youtube. Thank you again, sir.

  • @seabass6106
    @seabass6106 Před 3 lety

    Keep up the good work! Im actually learning Java, but your videos help me extremely well to get a clear understanding what ways are to appraoch difficult situations! thanks for that!

  • @anonanon3066
    @anonanon3066 Před 3 lety +3

    I always missed that "one" library for c++ networking.. THANK you!
    libcurl is nice but a pain to work with it's C syntax...
    ASIO is great! Thanks for showing me this!
    Also, thanks for taking the time for making all these videos. You truly are a gift for the c++ community.

    • @javidx9
      @javidx9  Před 3 lety +1

      Thanks Anonx2!

    • @PaweSkalczynski
      @PaweSkalczynski Před 3 lety

      Also please note that C++ Networking TS is being specified on ASIO. There are lots of people holding thumbs that in the end we will have standard networking for C++23 (so 2023 :) )

  • @nekoest
    @nekoest Před 3 lety +5

    Networking? WOOOOOOOOOOOO!

  • @eldarcuric3992
    @eldarcuric3992 Před 3 lety +1

    I truly enjoy your content, keep up the work, I'll contribute as soon as this specific timeline that we are in right now comes to pass.

  • @kamerkrali5214
    @kamerkrali5214 Před 2 lety +1

    I had a passion for software since I was a kid, but it was very small for what was sold at that time. It was difficult to find information in Turkish. After asking, I realized that even English was scarce on the internet at that time. Thank you for giving a lot of simple graphic emulators now.

  • @RogueShadowTCN
    @RogueShadowTCN Před 3 lety +4

    Every time, the two different audio recordings throw me for a loop. Although it works, hearing the ambient room noise when you're facing the camera suddenly makes me feel like I'm in the room with you. ...

    • @dhkatz_
      @dhkatz_ Před 3 lety

      I think that's the point. It's more personal. I don't see the issue

  • @selami32
    @selami32 Před 3 lety +45

    i dont have enough IQ to understanding these courses so i watch these when i need to sleep

    • @southernkatrina8161
      @southernkatrina8161 Před 3 lety +3

      And ASIO is Australia's government spy network. Australian Security Intelligence Organisation....

    • @re.liable
      @re.liable Před 3 lety +1

      Holy sh- same lol

    • @mihapetek3418
      @mihapetek3418 Před 3 lety +2

      @@southernkatrina8161 ASIO is also music production program...

    • @unlikelysalmon786
      @unlikelysalmon786 Před 3 lety +6

      @@southernkatrina8161 ASIO is also 4/5ths of a calculator

    • @ASCENDANTGAMERSAGE
      @ASCENDANTGAMERSAGE Před 3 lety +1

      I bet you are smart enough, just not interested. Which is a-okay. :) His voice is very soothing even for those of us who do watch for the content.

  • @supersquare
    @supersquare Před 3 lety

    Thank you so much for this series!! And structuring it around an MMO will make it so easy to understand :)

  • @r1pfake521
    @r1pfake521 Před 3 lety

    Awesome, I made something similar in C# a while ago, based on SocketAsyncEventArgs, but it was mostly just to learn something new, I only used it for a few small turn based games. Currently focused on a new single player project, but one day I will continue multiplayer stuff. Watching this and taking notes to improve my own C# library in the future.

  • @youtissoum
    @youtissoum Před 3 lety +3

    anyone know how to fix the problem of std::scoped_lock not begin defined in the tsqueue

    • @javidx9
      @javidx9  Před 3 lety +3

      Sure, enable c++17 for your compiler

    • @youtissoum
      @youtissoum Před 3 lety

      ​@@javidx9 how do you enable it (i'm using vs 2019)

    • @javidx9
      @javidx9  Před 3 lety +3

      @@youtissoum project properties, language standard, c++17

    • @youtissoum
      @youtissoum Před 3 lety

      @@javidx9 thanks it dont give me errors anymore

  • @UrThysis
    @UrThysis Před 3 lety +13

    I don't understand how people could dislike this video 🙄

    • @MatthewChaplain
      @MatthewChaplain Před 3 lety +4

      I liked the video because it's a really good and accessible intro to modern C++ networking and the inherent complexity in the domain. I use Asio myself. But the video does have a few problems that might irk some developers. The unsigned size, which is such a small thing, might be one of those things. But probably for the "thread-safe" queue. Consider a thread that calls q.front() and then inspects the result of that function. Meanwhile, another thread has called pop_front(), invalidating the reference that the first thread is inspecting. Adding locks in this way doesn't necessarily make an object thread-safe; it very much depends on the usage patterns.

    • @evalaviniabucur1789
      @evalaviniabucur1789 Před 3 lety +1

      They're either trolls or don't understand the code even after seeing the video. I always like javidx9 videos, even though I never code in C/C++ and there are parts I don't understand. I enjoy all his explanations and the approaches he has on various problems.

  • @phyl568
    @phyl568 Před rokem

    Thank you so much, i'm working on a (boost asio) TCP-UDP hybrid protocol, I've been stuck for the past three hours and you helped me figure out my problem ! You got a sub

  • @tsunamio7750
    @tsunamio7750 Před rokem

    I love how you make your code ultra-wide and readable for most viewers.
    Teachers can use it in school.
    I can see it from 5m away, cozy in my bed!

  • @slartibartfastBB
    @slartibartfastBB Před 3 lety +3

    For MacOSX use
    $ brew install asio

  • @walidjabari4985
    @walidjabari4985 Před 3 lety +12

    corporate: "so which versions of visual studio do you want to install on your computer ?"
    javidx9: "yes"

  • @jandastroy
    @jandastroy Před 3 lety

    I just discovered your channel and I am loving your style of humor and presentation. Thanks for sharing!

  • @awabomer
    @awabomer Před 3 lety +1

    I must say this is really an enjoyable video, it's like an sci-fi movie 😁, it's always amazing to see someone with really great skill.

  • @rondYT
    @rondYT Před 3 lety +3

    Me trying to learn C++: 🤓
    Me trying to learn Server-Client in C#: 😎
    Me when I get this video recommended: 🥵

    • @LuisA-qm8om
      @LuisA-qm8om Před 3 lety +1

      What I did is copy&paste functional code, and then modify it until i understand it;

  • @neuro5261
    @neuro5261 Před 3 lety +3

    3:03 he mistakenly says "boost asio" and hovers over boost_asio_1_18_0.zip
    Just to clear up confusion it is just asio-1.18.0.zip

    • @wizardy6267
      @wizardy6267 Před 3 lety +1

      He means it. if ppl downloaded the non-boost version. The `#define ASIO_STANDALONE` is not required anymore.

    • @neuro5261
      @neuro5261 Před 3 lety

      ​@@wizardy6267 Writing #define ASIO_STANDALONE would make sense if he downloaded boost asio but he didn't. At 3:39 is his file "asio-1.18.zip" and not "boost_asio_1_18_0.zip" ?

    • @wizardy6267
      @wizardy6267 Před 3 lety

      @@neuro5261 I didn't pay attention to 3:39. But I used the asio-1.18. When I tried to build. The compiler complained the macro `ASIO_STANDALONE` redefined in the library. Since he still has the macro defined. I guess either the warning is suppressed or he is using the boost version. Or maybe the 3:39 is the mistaken spot. :p

    • @sirgouki6207
      @sirgouki6207 Před 3 lety

      @@wizardy6267 I don't get that warning with mine, and I'm using the non-boost version. With the boost version, even with standalone set, I was still having to tell it to use boost::asio:: instead of asio::

  • @camwin7
    @camwin7 Před 3 lety +1

    This series looks fantastic. Its very difficult to find information on standalone asio, and the examples provided with it are very lacking.
    Looking forward to the rest of the videos!

  • @tonanornottonull7132
    @tonanornottonull7132 Před 3 lety

    quite a nice set of videos -- i usually implement my message collection queues when i'm doing my "day job" work using activemq which i'm particularly a fan of (i'm in the java world). this is making me want to dust off some of my older c++ applications and play around with them a bit :)

  • @jontnoneya3404
    @jontnoneya3404 Před 3 lety +4

    "We're not going to use sockets because...."
    First thing we do is create a socket

    • @codeman99-dev
      @codeman99-dev Před 3 lety

      Yes, exactly. Sockets suck ...until they don't.

  • @TheKluxi1
    @TheKluxi1 Před 3 lety +4

    hello

  • @rebollo87
    @rebollo87 Před rokem

    This is the 3rd time that I am going to see this videos to completely understand them and I will say that THIS IS PURE GOLD. This will save weeks of study and therefore THANK YOU.
    That said, it will be I think be clarifying I think for everyone if you could dedicated some minutes to explain asio executors and completion handlers even tho I know that this can be out of the scope of this videos but just with the intention of clarifying some important concepts.
    Thank you so much for your contribution.

  • @elultimopujilense
    @elultimopujilense Před 3 lety

    This channel us just pure gold! Thank you javidx9, you are my personal hero.

  • @gradyshastid3704
    @gradyshastid3704 Před 3 lety +7

    Why did you have to do this after I just spent the last six months learning socket programming.

    • @CottidaeSEA
      @CottidaeSEA Před 3 lety

      Six months for learning sockets?! How can you even spend that long on sockets?

    • @gradyshastid3704
      @gradyshastid3704 Před 3 lety +5

      @@CottidaeSEA most of it was just making data structs for it. I am building a scripting language and wanted it to work with socket programming.

    • @CottidaeSEA
      @CottidaeSEA Před 3 lety +5

      @@gradyshastid3704 Now it makes a whole lot more sense why it'd take that long. Because normally I can't imagine it taking more than a month, but that's still in-depth and with a couple of smaller projects to gain experience using them.
      As a side note, the two first things I made with sockets was a basic messenger and a battleships game. I already had the game ready, so I just slapped some multiplayer functionality onto it... though due to it being P2P one of the players could cheat by reading the memory, but I couldn't be bothered to add a server onto it. Even though I probably could've used the messenger server for it.
      Edit: this side note became the majority of the reply... well, shit.

  • @GNARGNARHEAD
    @GNARGNARHEAD Před 3 lety +3

    the Australian Security Intelligence Organisation? sus

  • @Picpizza
    @Picpizza Před 2 lety +1

    I found this very useful and I enjoyed your presentation. It was fun, and has lots of value.
    Pedagogical goodness!
    (also, your chrono dig was funny!)

  • @turpialito
    @turpialito Před 3 lety +2

    Looking forward to this. Cheers, mate!

  • @Otakutaru
    @Otakutaru Před 3 lety +2

    Every. Single. Video you make... Is helpful and entertaining. Thanks!

    • @javidx9
      @javidx9  Před 3 lety +1

      Hey thanks Otakutaru, glad to see they are appreciated!

  • @katapoka
    @katapoka Před 3 lety +2

    Such amazing coding skills and teaching technique. I really like your content. THanks

  • @tryingtocorrect
    @tryingtocorrect Před rokem

    I would vote this serious one of the best video series in youtube. Top 3 definitely.

  • @JustYesntMan
    @JustYesntMan Před 3 lety +1

    I am using QT for all my needs but this is also good to know, thank you sir

  • @Zethneralith
    @Zethneralith Před 3 lety

    I'm working exclusively in C#, but the thought process behind this is really useful. I've worked with networking on the small scale for a while, but I've wondered what the best practices were for handling communications between client/server like this for a while.

  • @movingheadmau8128
    @movingheadmau8128 Před 3 lety

    I have been thinking about creating a framework like this myself, but for C# instead of C++, since I have been using unity a lot lately and I want to get more into networking and communication between programs. I took a course in distributed systems at universiry last semester, but I think there is still a lot to learn and I am excited for future parts and your great explanations that come with them!

  • @dougthefiddler
    @dougthefiddler Před 3 lety

    Excellent tutorial! You make an intimidating subject seem less intimidating.

  • @smoothoctopus
    @smoothoctopus Před 4 měsíci +2

    The first 20 minutes are beyond gold, bearded man.

  • @troybaird404
    @troybaird404 Před 3 lety +2

    Really clear and detailed, keep it up!

  • @sahibjotsingh8238
    @sahibjotsingh8238 Před 3 lety +2

    I have been waiting a long while for this video

  • @florencepapillon
    @florencepapillon Před 3 lety +1

    Well done Javid and thanks for making all these tutorials and great stuff

  • @BudgiePanic
    @BudgiePanic Před 3 lety +1

    This video is awesome, I've always wondered how this kind of stuff is made.

  • @SparxableTunes
    @SparxableTunes Před 3 lety +1

    I love that your video's doin't have distracting music because then I get to add my own distracting music while I continuously rewind your content run on sentence XD

  • @josecarlosmunoz5202
    @josecarlosmunoz5202 Před 3 lety +1

    yes! I was hoping you would touch on this subject!

  • @Burak-ls5yd
    @Burak-ls5yd Před 3 lety

    This is what I wanted to see. Couldn't find anything about networking. Thank you!

  • @TheAngelOfDeath01
    @TheAngelOfDeath01 Před 3 lety +1

    BEST place on the internet for learning C++!

  • @BullyWiiPlaza
    @BullyWiiPlaza Před 3 lety

    This is great, I was looking for something like this recently. Your lua tutorial helped me a lot before so I subscribed :)

  • @user-oj4yl4tf6b
    @user-oj4yl4tf6b Před rokem

    Hey, guy. I'm so glad that I can see your video from a single CZcams Searching. It really impresses me when I have the first glance on the content of your video. I'm sure it's what I'm searching for. Don't be bothered by those negitive comments. Just let it go. BTW, I'm curious about do you have any serious about multi-threading of C++. I'm really eager to find such kind of materials. Since I want to switch my career from a SDET to C++ developer. They're so many things I need to learn and your course are just what I need. They're not just "hello world", they're valuable resources that can help me in my actual work and interview. Thank you so much again.

  • @wickster8384
    @wickster8384 Před 3 lety

    Looking forward to part 2 of this series! subbed and liked. keep it up!

  • @filosofisto
    @filosofisto Před 3 lety

    Thanks Javidx9 for all those fantastic video of high technical quality, ..., simply congratulation

  • @tecoberg
    @tecoberg Před 3 lety

    Great tutorial! I'm eager for the next part.
    Thanks

  • @GeorgeWulfers_88
    @GeorgeWulfers_88 Před 3 lety

    This is an exciting series! I am looking forward to it :)

  • @valeryivanov7756
    @valeryivanov7756 Před 3 lety

    Thank you a lot! This stuff is brilliant! The lovest part where you describe the architecture. I will try to apply this way in my work, thank you!
    More architecture :)
    Thank you!

  • @alexb6568
    @alexb6568 Před 3 lety

    Finally an explanation for this kafkaesque and nebulous library in English, unlike the confusing "tutorials" on the Boost::Asio site.