No video

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

  Рет қаралды 541,378

javidx9

javidx9

Күн бұрын

Пікірлер: 924
@javidx9
@javidx9 3 жыл бұрын
For all those unconvinced it can work, please download and try the prototype project here! onelonecoder.itch.io/meaningless-cog
@Zaneris
@Zaneris 3 жыл бұрын
Decided to provide some tea for this quality content ;) Keep up the good work.
@javidx9
@javidx9 3 жыл бұрын
Thank you Zaneris! Much appreciated!
@javidx9
@javidx9 3 жыл бұрын
Yeah asio comes with ssl objects you can use to negotiate https. A bit too complex for a simple introduction 😁
@Ryan-xq3kl
@Ryan-xq3kl 3 жыл бұрын
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 3 жыл бұрын
thanks for all the work you do! as someone learning c++, you are truly helpful thank you
@comment1652
@comment1652 3 жыл бұрын
I have no idea what i'm watching, but thank you bearded man for the knowledge.
@javidx9
@javidx9 3 жыл бұрын
Best comment ever XD
@mattmurphy1065
@mattmurphy1065 3 жыл бұрын
I work in IT, and the only thing I understood was the networking lol
@soundbreaker2485
@soundbreaker2485 3 жыл бұрын
HTTPS changed the strings being sent in plain text though
@williamgomez6087
@williamgomez6087 3 жыл бұрын
You have to see "Hands on Machine Learning whit python"...
@devhonk1722
@devhonk1722 3 жыл бұрын
@@LockeIProd and that does not count from 1 lmao
@filmcase1683
@filmcase1683 3 жыл бұрын
This man will always be the person I go to for difficult c++ programs
@superscatboy
@superscatboy 3 жыл бұрын
It's a real shame he refuses to use modern C++ idioms and techniques.
@qx-jd9mh
@qx-jd9mh 3 жыл бұрын
@@superscatboy Cniles are set in their ways
@superscatboy
@superscatboy 3 жыл бұрын
@@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 3 жыл бұрын
@@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 3 жыл бұрын
​@@superscatboy Well, the best modern C++ idiom in most cases probably is to ditch it for Rust ;-)
@motbus3
@motbus3 3 жыл бұрын
Stop and realize for one moment how great the content OLC has been posting. Really amazing.
@DidYouCropThat
@DidYouCropThat 3 жыл бұрын
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 Жыл бұрын
this video is explanation of how web works under the hood.
@Spawnova
@Spawnova 3 жыл бұрын
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 3 жыл бұрын
still how can i make my vs work with that?
@welcomereality924
@welcomereality924 3 жыл бұрын
@@crazypeter113 check the properties files vscode creates, there must be some sort of parameter for includes iirc
@sketburd9360
@sketburd9360 3 жыл бұрын
this ^^^
@The_Nelliel
@The_Nelliel 2 жыл бұрын
Thank you, omg lol I was getting pissed lol
@ajaydalal199
@ajaydalal199 Жыл бұрын
thanks bro, you saved me a lot of time and headache.
@MarcoBergamin
@MarcoBergamin 3 жыл бұрын
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.
@femboy.owo7
@femboy.owo7 Жыл бұрын
thanks for the tips dude!
@NoxaDreshar
@NoxaDreshar 3 жыл бұрын
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
@mattbrewerton6884
@mattbrewerton6884 3 жыл бұрын
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 Ай бұрын
C++ is for people who like to find problems for their solutions.
@YariRu
@YariRu 2 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
Hey thanks buddy! It's a formula that works.
@smoothoctopus
@smoothoctopus 5 ай бұрын
The first 20 minutes are beyond gold, bearded man.
@ahaquer153
@ahaquer153 3 жыл бұрын
I don't think I've ever clicked on a video faster
@filmcase1683
@filmcase1683 3 жыл бұрын
I know, right?
@pwnrz8684
@pwnrz8684 3 жыл бұрын
@@filmcase1683 MAIAMAIAMIAMAIAMIAMAIMAIMAIAMIAMAIMA
@TheDubleyaC
@TheDubleyaC 3 жыл бұрын
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_ 3 жыл бұрын
[2]
@johnbrodie9815
@johnbrodie9815 3 жыл бұрын
same my dude
@RoryBecker
@RoryBecker Жыл бұрын
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.
@trobinsoon
@trobinsoon 2 жыл бұрын
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 (:
@kamerkrali5214
@kamerkrali5214 2 жыл бұрын
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.
@bongumsamamba5146
@bongumsamamba5146 3 жыл бұрын
this dude makes everything looks simple
@SourceCodeDeleted
@SourceCodeDeleted 3 жыл бұрын
I am really interested to see this !!! Much needed !!!
@Zaneris
@Zaneris 3 жыл бұрын
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 3 жыл бұрын
Your user name gives me anxiety
@SourceCodeDeleted
@SourceCodeDeleted 3 жыл бұрын
@@stewartzayat7526 Not the first time I have heard this))
@deleater
@deleater 3 жыл бұрын
@@SourceCodeDeleted you make me want to create another account named "Executable Reverse Engineered" lol.
@persoulrpg
@persoulrpg 3 жыл бұрын
Golden content, yet it's free. Appreciate it people :-)
@doommaker4000
@doommaker4000 3 жыл бұрын
@Rusty Boomerton We know
@tsunamio7750
@tsunamio7750 2 жыл бұрын
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!
@bobarnoldjr.1937
@bobarnoldjr.1937 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!
@sterdot
@sterdot 3 жыл бұрын
Coming from a music production background, I was very confused by ASIO in the title...
@javidx9
@javidx9 3 жыл бұрын
Lol yes, its quite an unfortunate coincidence!
@user-tx2si2zp1i
@user-tx2si2zp1i 3 жыл бұрын
@@javidx9 I wish there were more tutorials on Steinberg's ASIO, lol
@user-yr1uq1qe6y
@user-yr1uq1qe6y 3 жыл бұрын
I thought the exact same thing when I saw the title come up.
@lucadavidian5441
@lucadavidian5441 3 жыл бұрын
Me too!
@foamyrocks665
@foamyrocks665 3 жыл бұрын
Me too. They aren't related? I thought the ASIO audio drivers are based on the concepts shown here from the ASIO library.
@mattwhelan13
@mattwhelan13 3 жыл бұрын
I don't think it's an understatement to say that this video is something that I've wanted for years
@javidx9
@javidx9 3 жыл бұрын
Well this one starts with very basic but necessary building blocks, the real fun stuff comes next!
@mattwhelan13
@mattwhelan13 3 жыл бұрын
@@javidx9 precisely, a lot of people skip to the cool stuff but you explain really well what you actually need to do to get set up, it's refreshing
@jake3476
@jake3476 2 жыл бұрын
A lot of mental effort was clearly put into making this video as informative as it could be. Thank you for your hard work.
@doublegdog
@doublegdog 3 жыл бұрын
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 3 жыл бұрын
Glad you enjoy it doublegdog!
@juappdev
@juappdev 3 жыл бұрын
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 3 жыл бұрын
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.
@HupLOader561
@HupLOader561 3 жыл бұрын
You always do something that not any ANY other KZfaq 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!
@-argih
@-argih 3 жыл бұрын
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
@billybest5276
@billybest5276 3 жыл бұрын
this was great, can't wait for the rest of the series.
@bruno_kid_
@bruno_kid_ 3 жыл бұрын
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"
@wickster8384
@wickster8384 3 жыл бұрын
This!
@sergeiborodin9254
@sergeiborodin9254 3 жыл бұрын
The absence of comprehensive ASIO tutorials (I have seen only one good personal blog about using ASIO in C++) makes this tutorial a solid gold bar in the world of C++. Though I've used ASIO to build my own library in very similar fashion to yours - the learning threshold is very high even to professional programmers - I made many babysteps in a very long time to actually implement basic functionality. I had many thread running the context. I used JSON (nlohmann-json) as message payload to pass callable tied async function to ASIO context and get std::future as result. So it was basically a RPC library. Get message -> parse JSON -> find tied function in hash-table -> move function to asio context -> get future -> use future in needed thread. Looks simple but it took weeks of studying and I am very far from from C++ beginner. So you have my respect, sir. You did many people a great service for tearing apart and vivisecting this complex subject.
@javidx9
@javidx9 3 жыл бұрын
Thanks Sergei, yeah the documentation for asio is a bit sparse, and oddly dense at the same time. Hopefully that will improve in the near future. Its a monstrously powerful library, I'll barely scratch the surface in this series.
@sergeiborodin9254
@sergeiborodin9254 3 жыл бұрын
@@javidx9 Yes, asio documentation helps a lot if you know where to look. And fails miserably to provide usage meta. Asio is absolutely merciless to newcomers.
@secretchannel2151
@secretchannel2151 3 жыл бұрын
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!
@joidshgoi5435
@joidshgoi5435 3 жыл бұрын
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.
@user-bv9if3ft7i
@user-bv9if3ft7i Жыл бұрын
*only on windows
@samuelcampbell6559
@samuelcampbell6559 3 жыл бұрын
"Oh no _not Boost_"... I laughed out loud.
@richardvonlehe4581
@richardvonlehe4581 3 жыл бұрын
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.
@TheAngelOfDeath01
@TheAngelOfDeath01 3 жыл бұрын
BEST place on the internet for learning C++!
@wizardy6267
@wizardy6267 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.
@anonanon3066
@anonanon3066 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 3 жыл бұрын
Thanks Anonx2!
@PaweSkalczynski
@PaweSkalczynski 3 жыл бұрын
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 :) )
@calogiga
@calogiga 6 ай бұрын
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.
@SparxableTunes
@SparxableTunes 3 жыл бұрын
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
@nekoest
@nekoest 3 жыл бұрын
Networking? WOOOOOOOOOOOO!
@blackninja9400
@blackninja9400 3 жыл бұрын
how isp is spying you?
@UrThysis
@UrThysis 3 жыл бұрын
I don't understand how people could dislike this video 🙄
@MatthewChaplain
@MatthewChaplain 3 жыл бұрын
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 3 жыл бұрын
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.
@MuhammadArshad
@MuhammadArshad 3 жыл бұрын
I have never clicked on part 2 of any video series as faster as I did for this one. Thank you so much.
@wowLinh
@wowLinh 3 жыл бұрын
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 3 жыл бұрын
Hi wowLinh - yeah, i really want to avoid the traditional means of describing this architecture, its just boring :D
@selami32
@selami32 3 жыл бұрын
i dont have enough IQ to understanding these courses so i watch these when i need to sleep
@southernkatrina8161
@southernkatrina8161 3 жыл бұрын
And ASIO is Australia's government spy network. Australian Security Intelligence Organisation....
@re.liable
@re.liable 3 жыл бұрын
Holy sh- same lol
@mihapetek3418
@mihapetek3418 3 жыл бұрын
@@southernkatrina8161 ASIO is also music production program...
@unlikelysalmon786
@unlikelysalmon786 3 жыл бұрын
@@southernkatrina8161 ASIO is also 4/5ths of a calculator
@ASCENDANTGAMERSAGE
@ASCENDANTGAMERSAGE 3 жыл бұрын
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.
@walidjabari4985
@walidjabari4985 3 жыл бұрын
corporate: "so which versions of visual studio do you want to install on your computer ?" javidx9: "yes"
@chainq68k
@chainq68k 3 жыл бұрын
I don't even like C++, but I still watch these videos for the engineering thought going into the code. So much to learn from that alone.
@Otakutaru
@Otakutaru 3 жыл бұрын
Every. Single. Video you make... Is helpful and entertaining. Thanks!
@javidx9
@javidx9 3 жыл бұрын
Hey thanks Otakutaru, glad to see they are appreciated!
@RogueShadowTCN
@RogueShadowTCN 3 жыл бұрын
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_ 3 жыл бұрын
I think that's the point. It's more personal. I don't see the issue
@rondYT
@rondYT 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 3 жыл бұрын
What I did is copy&paste functional code, and then modify it until i understand it;
@Kyagara
@Kyagara 3 жыл бұрын
As someone that loves MMOs, this is something I've always wanted to learn more about, thanks for the video!
@CediCore
@CediCore 4 ай бұрын
Sir, they way you talk makes me very comfortable ❤ thank you.
@drel9300
@drel9300 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!
@youtissoum
@youtissoum 3 жыл бұрын
anyone know how to fix the problem of std::scoped_lock not begin defined in the tsqueue
@javidx9
@javidx9 3 жыл бұрын
Sure, enable c++17 for your compiler
@youtissoum
@youtissoum 3 жыл бұрын
​@@javidx9 how do you enable it (i'm using vs 2019)
@javidx9
@javidx9 3 жыл бұрын
@@youtissoum project properties, language standard, c++17
@youtissoum
@youtissoum 3 жыл бұрын
@@javidx9 thanks it dont give me errors anymore
@samuelhulme8347
@samuelhulme8347 2 жыл бұрын
“Stepping through every line of code”, I wished my debuggers explained like you 👍
@gasparRaduB
@gasparRaduB 3 жыл бұрын
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.
@neuro5261
@neuro5261 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 3 жыл бұрын
He means it. if ppl downloaded the non-boost version. The `#define ASIO_STANDALONE` is not required anymore.
@neuro5261
@neuro5261 3 жыл бұрын
​@@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 3 жыл бұрын
@@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 3 жыл бұрын
@@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::
@jontnoneya3404
@jontnoneya3404 3 жыл бұрын
"We're not going to use sockets because...." First thing we do is create a socket
@codeman99-dev
@codeman99-dev 3 жыл бұрын
Yes, exactly. Sockets suck ...until they don't.
@tryingtocorrect
@tryingtocorrect Жыл бұрын
I would vote this serious one of the best video series in youtube. Top 3 definitely.
@quentinquadrat9389
@quentinquadrat9389 3 жыл бұрын
I did not know ASIO until your video, it looks having a clean API. Nice !
@slartibartfastBB
@slartibartfastBB 3 жыл бұрын
For MacOSX use $ brew install asio
@javidx9
@javidx9 3 жыл бұрын
Cool, thanks!
@TheKluxi1
@TheKluxi1 3 жыл бұрын
hello
@Dygear
@Dygear 3 жыл бұрын
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.
@kell7689
@kell7689 3 жыл бұрын
Imma click on this video and like it because a few months ago, I was trying to do networking in C++ and found ZERO good video references. Good work sir.
@gradyshastid3704
@gradyshastid3704 3 жыл бұрын
Why did you have to do this after I just spent the last six months learning socket programming.
@CottidaeSEA
@CottidaeSEA 3 жыл бұрын
Six months for learning sockets?! How can you even spend that long on sockets?
@gradyshastid3704
@gradyshastid3704 3 жыл бұрын
@@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 3 жыл бұрын
@@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 3 жыл бұрын
the Australian Security Intelligence Organisation? sus
@Adrian_Fleck
@Adrian_Fleck 3 жыл бұрын
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.
@pointyhairedboss1
@pointyhairedboss1 3 жыл бұрын
I was looking for a quick intro to asio and this was great. Thank you.
@GregoryTheGr8ster
@GregoryTheGr8ster 3 жыл бұрын
I have never been far enough along in one of my projects to need to dive into networking. Thus, I know that the day that I need to make this dive, I will have made real progress. It will be a cause for celebration, possibly with champagne.
@rudolphbennett3988
@rudolphbennett3988 3 жыл бұрын
What an excellent C++ demo, javidx9
@alexb6568
@alexb6568 3 жыл бұрын
Finally an explanation for this kafkaesque and nebulous library in English, unlike the confusing "tutorials" on the Boost::Asio site.
@sahibjotsingh8238
@sahibjotsingh8238 3 жыл бұрын
I have been waiting a long while for this video
@irbaboon1979
@irbaboon1979 3 жыл бұрын
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!
@turpialito
@turpialito 3 жыл бұрын
Looking forward to this. Cheers, mate!
@eddek6141
@eddek6141 3 жыл бұрын
Let's fucking go!!!! I changed to and learned c++ in last 6 months for mmo networking
@logc1921
@logc1921 3 жыл бұрын
The timing couldn't be perfect! I am making a raycaster with LAN. You are so helpful!
@rebollo87
@rebollo87 2 жыл бұрын
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.
@mohamedmoatyhassan5125
@mohamedmoatyhassan5125 3 жыл бұрын
Thank you for providing this quality content for free!
@javidx9
@javidx9 3 жыл бұрын
Glad you enjoy it!
@farzadfarzady1282
@farzadfarzady1282 Жыл бұрын
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 🙂
@trapOrdoom
@trapOrdoom 3 жыл бұрын
Now it’s time I actually try this. Dude is so fucking resourceful. Must’ve somehow avoided playing OSRS his whole life. What a codified gangster. Thanks!
@funtara6571
@funtara6571 Жыл бұрын
@30:31 (Creating Message) your memberfunction size_t size() on the video calculate the size of the msg (msgheader + body), but on the github repo you use only the bodysize. If you create msg like @(30:31) the client program will only do one ping to the server (the roundtime is miscalculated) and you can press the "1"-key so often you want, you dont get any pingmsgs. Btw: great explanation of the architecture and of the new c++ sugar. -- thx --
@DavidDachaDjordjevic
@DavidDachaDjordjevic 3 жыл бұрын
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. :)
@eldarcuric3992
@eldarcuric3992 3 жыл бұрын
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.
@Spirrwell
@Spirrwell 2 жыл бұрын
"They just happen to be the ones that I like, except for chrono" lol, ah... That got me, that was good.
@AmberHearts
@AmberHearts 3 жыл бұрын
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!
@DIDIJEANPHI
@DIDIJEANPHI 3 жыл бұрын
Great vid !!! I've been using ASIO for many projects at work. I really love the way you introduced it.
@jasperkooij1891
@jasperkooij1891 3 жыл бұрын
I'm looking forward to part 2!
@katapoka
@katapoka 3 жыл бұрын
Such amazing coding skills and teaching technique. I really like your content. THanks
@troybaird404
@troybaird404 3 жыл бұрын
Really clear and detailed, keep it up!
@UAVXP
@UAVXP 3 жыл бұрын
Waiting for the following series! 31:24 Oh god, my eyes just exploded when you switched from the black to white screen
@awabomer
@awabomer 3 жыл бұрын
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.
@ethannoble1799
@ethannoble1799 3 жыл бұрын
I've been waiting for this video FOREVER
@phyl568
@phyl568 Жыл бұрын
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
@user-oj4yl4tf6b
@user-oj4yl4tf6b Жыл бұрын
Hey, guy. I'm so glad that I can see your video from a single KZfaq 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.
@sirenti9384
@sirenti9384 3 жыл бұрын
I never thought of doing this type of thing with C++(did it with Java in the past). - I am really excited about this series!
@Picpizza
@Picpizza 2 жыл бұрын
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!)
@javidx9
@javidx9 2 жыл бұрын
Thanks John!
@yjc149
@yjc149 Жыл бұрын
one of the best presentation of Asio.
@florencepapillon
@florencepapillon 3 жыл бұрын
Well done Javid and thanks for making all these tutorials and great stuff
@leftofzen
@leftofzen Жыл бұрын
If you're using modern c++, why use std::vector instead of std::vector ?
@goglom12
@goglom12 3 жыл бұрын
You also can use SFML Network module, it have a very simple interface to TCP\UDP Sockets and also have a SocketSelector!
One Lone Short
0:56
javidx9
Рет қаралды 47 М.
How I Did The SELF BENDING Spoon 😱🥄 #shorts
00:19
Wian
Рет қаралды 36 МЛН
Magic trick 🪄😁
00:13
Andrey Grechka
Рет қаралды 44 МЛН
Java Is Better Than Rust
42:14
ThePrimeTime
Рет қаралды 240 М.
Networking in C++
32:50
The Cherno
Рет қаралды 242 М.
Andrew Kelley   Practical Data Oriented Design (DoD)
46:40
ChimiChanga
Рет қаралды 81 М.
100+ Linux Things you Need to Know
12:23
Fireship
Рет қаралды 1 МЛН
C vs C++ | Which Should you Learn? #coding #c #software
0:59
Caleb Curry
Рет қаралды 46 М.
Practical Polymorphism C++
41:44
javidx9
Рет қаралды 125 М.
Should you learn C++?? | Prime Reacts
20:29
ThePrimeTime
Рет қаралды 349 М.
I forced EVERYONE to use Linux
22:59
NetworkChuck
Рет қаралды 406 М.
The Clever Way to Count Tanks - Numberphile
16:45
Numberphile
Рет қаралды 997 М.
How I Did The SELF BENDING Spoon 😱🥄 #shorts
00:19
Wian
Рет қаралды 36 МЛН