Introduction to TCP/IP and Sockets, part 1: Introducing the protocols and API
Vložit
- čas přidán 3. 07. 2024
- This is a basic introduction to the Internet protocols and how to use them in programs using sockets.
This is the first of two introduction videos on the Internet Protocol and its family of associated protocols (UDP, TCP, etc.) as well as Sockets, a pseudo-standard interface made for programmers to write programs which use these protocols.
The slides for this video can be found here: tinyurl.com/ybfjnekq
Also check out the part 2 video, where I cover real C++ code examples of this: • Introduction to TCP/IP...
Index for skipping to the sections you care about:
00:00 - Introduction
00:33 - Internet Protocol
04:05 - IP fragmentation
05:04 - IP headers
09:14 - IP is "best effort" delivery
10:28 - User Datagram Protocol (UDP)
12:08 - Transmission Control Protocol (TCP)
14:03 - TCP connection states
18:21 - TCP headers
22:08 - Sockets API
23:20 - Connection-oriented socket functions
27:30 - Datagram-oriented socket functions
28:35 - Socket addresses (sockaddr)
29:34 - Socket options (sockopt)
31:21 - Blocking vs. Non-Blocking (fcntl) - Věda a technologie
Great video! Clutter-free, easy to understand and follow! Love it
Loved the video. Thanks for your time and effort. Sharing the slides is very appreciated.
Really awesome video. All these concepts now makes sense to me. Thanks for quality content.
Thank you for your amazing video! The explanation is perfect, everything is so well-covered. Love it!
Thanks for making this so easy to understand! I've been looking for videos to help me with work in this area for the past couple of days and this is by far the best one. :)
This is good! And I like that you have the sections with titles, so that it is easier to jump back and forth in the video to find what you want. Great work!
Best networking video on CZcams. Thank you for creating this series.
this video was amazing. the explanations are clear and has given me the most perspective when it comes to the socket programming. most of the other videos out there assume the viewer has much more knowledge then what your video does, its almost like psuedo code for socket protocols, super understandable and fairly comprehensive.
Fantastically explained. Its been so long since i have learned all this in University. This was a nice refresher. Thank you
This video has helped me enormously. Thank you so much.
I never thought it was, that easy to understand. Thanks a lot.
I can not explain how much I enjoyed this video! So well explained, I was very confused on this topic
this is the best explanation of computer networks that i could find on youtube, thank you for your work
Awesome an overview for this topic! Thanks.
This video almost summarize the details I read in some books into clear and details video. Thank u
Amazing, video. Thanks. You are a very concise and clear teacher. You are very good at not bogging down the technical info with too much technical grammar; congrats!
Great explanation, thanks
Hey! This video has helped me a lot to learn the basics! I can't thank you enough :')
Thanks for making this video, great explanation!
Thank you for providing this as I am trying to learn and create my own web server from scratch. I wish CZcams algorithm will pick up your channel more as you provide quality content every time. Just subscribed too.
Really great, Knowing and teaching are 2 difficult art and you mastered both.
Greatest explanation there is ! 🚀👍
Keep making videos this is really helpful, i hope you get more recognition!
Perfect, That was quite good and detailed enough...Thanks.
This was a legendarily well articulated explanation. Thank you for donating your time to make this.
Glad you enjoyed it!
By faaaaaaaaaaaaa ... aaaaaaaar the best explanation I have ever found on CZcams. Thanks, congratulations and reapsect 🤜🤛
Just amazing. How come he is so clear and easy to understand..Others should follow his technique.
Thank you for your video. Really clear explanations and entertaining to learn!
I'm glad you enjoyed it! :D
Now that’s quality content
Love this, thank you!
Super good! Thanks!
Awesome Video, really helpful explanations to go along with some initially scary diagrams. Appreciate the help. :)
Was watching your videos on learning Rust when I saw this introduction.
Extremely well presented!
I'm glad you enjoyed it! :D
Great video, thanks so much!
Rhymu, absolutely loved the video! The diagrams aren't so scary once you've explained them. I am heading to the second video now! :D
I'm glad you liked it!
very well explained although i suggest watching other videos too since this one completes the journey !
real internet Guru
Thank you for this.
By far the BEST Explanation about SOCKET... Everyone is just saying Socket is just Ip address+port... But it is very Ambiguous... You just Explained it very well... Socket is nothing but An API... Through which my Web Application Code talks to Kernel & thus tells kernel to do some stuffs with all the Protocols...
Thank you very Much Sir...❤️❤️❤️
I am a beginner in embedded systems and not sure that web-programming will be applicable on my job. I've decided to familiarize a little with such stuff like TCP/IP and obtained nothing but a mess in my head. Your videos are really clear and now i see a difference between TCP and IP, lol. In fact, that topic seems to be interesting for me. Thank you very much.
helped a lot,thank you so much
As a game developer concerned mostly with cpp. this is a fantastic video and I am very glad I found your channel.
I just want to say special thanks for the time you put into those videos, the production quality, slides, and animations, I know they take way more time than the recording itself, so allow me again to say thanks.
Thank you so much! I enjoy making these videos, and just wish I had more time to spend on them.
@@rhymu
I couldn't follow the second video, ( I am completely new to network programming and I Just saw your video, and I understand now how to TCP works but I felt the next part was little advanced to me,
May i Know any good resources you think that will enable me to understand the next part? I am already reading through the rfc you mentioned and it all looks good.
@@ali51717 I fear that I made the difficulty ramp too steep between these two videos. I should have made a video in between that perhaps gets a little into the code but not so advanced. Thank you for the feedback!
I think if you feel ready for it, either the POSIX threads or WinSock documentation pages would be good to guide you towards the programming aspect. A good starting point might be here: docs.microsoft.com/en-us/windows/win32/winsock/getting-started-with-winsock
@@rhymu I am very thankful for your reply.
I will check those right away thanks!
Great. Thank you.
You are welcome!
Man... you have just summarized stuffs I learned in two networking courses.. hats off... will you continue the series?
I'm glad you liked it! I'm considering making another video exploring some common techniques for constructing and parsing messages sent across the network: JSON, protocol buffers, and serialization techniques in general.
If there is some aspect of networking you would like me to consider for a future video, please let me know!
Nice video. TY
Thank you!
Thanks man
Will you update the playlist, one day? Your teaching is pretty good
Man you are a hero! please make web development tutorials on nodeJS
I'll let you in on a secret, just don't tell anyone else. :D I know almost nothing about NodeJS! I would be glad to make web development tutorials on NodeJS. However, I will need to study it myself, first.
In the mean time, may I refer you to my guru for web development? Check out Chris Griffing and his Twitch stream, where he often demonstrates web development live: twitch.tv/cmgriffing -- He probably can recommend several NodeJS learning resources. In the past, he has already recommended this site which covers web development in general, and has a lot of other learning resources as well: freecodecamp.org/
@@rhymu I will be waiting. Thanks very much :)
bravo!
this is the fastest channel that I clicked subscribe, lol the this small packets joke
Helped me fix a bug on a microcontroller thanks
👍thanks🤘
thanks
You're a really good teacher. Wish I got this quality from my university.
nice Tutorial Gilfoyle
Very nice explanation! I miss your twitch streams though (:
Twitch streams starting back up December 1st for Advent of Code 2021!
Please make more video like this, for education purpose ^^ video in stream is quite long, ~3hour/video
This was a great video! I’m new to cpp and am interested in learning more about server development in the context of game servers/dev. Do you have any tips/advice on how to go about this? I’m definitely going to check out more of your channel too!
This is a very challenging area to study, with many parts to consider. Games can be very demanding when it comes to server requirements; players want low-latency as well as high availability, and games have a rather unique challenge other kinds of servers don't have: keeping the games fair by preventing players from cheating.
I'm by no means an expert; I recommend the blogs and presentations made by experts in the field, such as this one about client-side game architecture: www.gabrielgambetta.com/client-server-game-architecture.html
If you prefer CZcams content, check out videos such as this one, made by the creators of "Rocket League", which covers some of the challenges and solutions they came up with for the networking aspects of their game: czcams.com/video/ueEmiDM94IE/video.html
OH my god!!!!!!!!!!!!!!!!!!
no offense to other IT channels but their presentation and microphones betray their expertise lol. your video is well made and v easy to follow, great stuff
I love you
gay spotted
hey great video! had a few questions:
1. You mentioned that sockets are like access point to access the protocol stack, what do you mean by that? why should there be an access point? Whats the need for an access point?
2. Why do we need sockets? if the packet gets the destination IP(from network layer) and the destination port number (from the transport layer) then why do i need sockets in UDP? The packets go through the network and gets routed to the destination right? I understand we need sockets in TCP because its connection oriented and so to establish the connection we need sockets but why in UDP? please correct me if I'm wrong here.
I'm having a hard time understanding the concept of sockets and its need. HELP!
1. What I mean by access point is a handle or object that an application uses in conjunction with the operating system APIs to send and receive data through a network interface. Think of a socket as analogous to a file handle.
2. You need sockets because a socket is the interface between the application and the operating system for exchanging network packets. Think from the operating system's perspective: "I just got this packet from google.com; which application should I deliver it to?" The answer is the operating system keeps a table of sockets, where each socket is "bound" to a protocol, local address and port number, and is associated with one of the many applications that are running on the host. The operating system inspects the packet to find the protocol, local address and port number, and looks up which socket in its table that maps to. If it finds one, it delivers the packet to the application associated with it. Just like a file or a mailbox. It doesn't matter if it's connection-oriented or packet-oriented. It's about the addressing and binding.
@@rhymu ah! That makes sense.. thanks so much! :)
Like
Is the Header Checksum the same as the Frame Check Sequence?
Yes, the header checksum is specifically the frame check sequence used for these protocols. (Frame Check Sequence being a general term and in the case of TCP/IP the implementation of it is the header checksum).
@@rhymu Thanks! ❤
The video is excellent but a pop filter would improve the audio quality a lot.
Thanks for the suggestion. It's been on my list of setup improvements for a while, along with a better microphone.
Interestingly, I got a lot of trouble while using Python rather than C in term of TCP
Isn't it TCP that divides data into multiple packets and not the IP?
Watch in 2x thank me later..
wrg, soundx doesnt matter, no such thing as yellx etc or not
true, the wolf sees the gtb and then the yellx no longer exists or maybe it does... wait what are we talking about?
Great explanation except for the awful SM
Great Video, Thanks!
Thank you !
You're welcome!