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

preview_player
Показать описание
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.

Рекомендации по теме
Комментарии
Автор

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

comment
Автор

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

filmcase
Автор

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

motbus
Автор

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.

DidYouCropThat
Автор

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.

MarcoBergamin
Автор

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.

Spawnova
Автор

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

NoxaDreshar
Автор

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.

YariRu
Автор

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.

HitAndMissLab
Автор

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.

kamerkrali
Автор

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.

RoryBecker
Автор

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

SourceCodeDeleted
Автор

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

persoulrpg
Автор

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 (:

trobinsoon
Автор

The first 20 minutes are beyond gold, bearded man.

smoothoctopus
Автор

this dude makes everything looks simple

bongumsamamba
Автор

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


I don't use C++.

mattbrewerton
Автор

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!

bobarnoldjr.
Автор

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

jake
Автор

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!

doublegdog