Socket Programming Tutorial In C For Beginners | Part 1 | Eduonix

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ต.ค. 2024
  • Learn Programming, anywhere anytime - 2ly.link/1wqYP
    Sockets are the low-level endpoints used for processing information across a network. Some common protocols like HTTP, FTP rely on sockets to make connections. Socket Programming is the route of connecting two points on a network to communicate with each other. In this video, you will learn the basics of Socket Programming like definitions, Client socket workflow, Server Socket workflow and many more.
    Get Our Bestselling Paid Courses For Free!
    Projects in MongoDB - Learn MongoDB Building Projects - bit.ly/42IxSWa
    The Full Stack Web Development - bit.ly/3pO6S9r
    Learn To Create WordPress Themes By Building 10 Projects - bit.ly/3pQC9bS
    Projects In Laravel: Learn Laravel Building 10 Projects - bit.ly/3Mxs8sJ
    Learn Machine Learning By Building Projects - bit.ly/3Myw3Wk
    Get Yourself Any Course Of Your Choice For Free
    {Use Coupon Code: YTBFREE}
    Explore Our All Courses - www.eduonix.co...
    You will find the previous parts here:
    Part 1: goo.gl/kv1VTY
    Part 2: goo.gl/6dTU4F
    ➡ Get Extra 30% OFF on the above course with certification - bit.ly/2PLW9YQ ( APPLY COPOUN - YT30)
    👉Enjoy Extra 50% off on the Below E-Degrees with certification - (APPLY COPOUN - COL50)
    🔹AI & ML E-degree- bit.ly/2mEUCYC
    🔹MERN Stack Developer E-Degree Program - bit.ly/2pFSz7J
    🔹DevOps E-degree - bit.ly/2J6Gf7u
    🔹Cloud Computing E-Degree - bit.ly/2Hyv5dO
    🔹Cybersecurity E-Degree - bit.ly/2Hyv5dO
    🔹IoT E-degree - The Novice to Expert Program in IOT - bit.ly/3dTtSJP
    🔹Advance Artificial Intelligence & Machine Learning E-Degree - bit.ly/336NwOU
    ★★★The Best courses & Bundles to do with Eduonix with Flat 50% OFF ★★★ ( APPLY COUPON - COL50)
    1.Learn Machine Learning By Building Projects - bit.ly/2MxMSSl
    2.The Complete Web Development Course - Build 15 Projects - bit.ly/32Ah9oW
    3.The Full Stack Web Development - bit.ly/2MZDBRV
    4.Projects In Laravel : Learn Laravel Building 10 Projects - bit.ly/2MAiHtH
    5.Mathematical Foundation For Machine Learning and AI - bit.ly/2N23Eb1
    1.Mighty Digital Marketing Bundle - bit.ly/2X3xK3U
    2.AI and Machine Learning Guru - bit.ly/3okSbFG
    3.Game Development Masterpack - bit.ly/3mdTSTk
    4. Mighty Web Development Bundle 2.0 - bit.ly/3ouO3TA
    ✔ Get Exclusive Flat 30% off on Our Lifetime membership - bit.ly/3dO6oGc ( APPLY COUPON : YTLIFE30)
    Thank you for watching! We’d love to know your thoughts in the comments section below. Also, don’t forget to hit the ‘like’ button and ‘subscribe’ to ‘Eduonix Learning Solutions’ for regular updates.
    tiny.one/y4zwynj4
    Follow Eduonix on other social networks:
    Facebook: goo.gl/ZqRVjS
    Twitter: goo.gl/oRDaji
    Instagram: goo.gl/7f5DUC
    Linkedin: goo.gl/9LLmmJ
    Pinterest: goo.gl/PczPjp

ความคิดเห็น • 397

  • @Eduonix
    @Eduonix  7 หลายเดือนก่อน

    Get Yourself Lifetime Membership Access With Super Saving Offer!
    Use Coupon Code: LMPYT249
    Check Out The Perks Of Lifetime Membership: tiny.one/2p8mz56t

  • @anuragparcha4483
    @anuragparcha4483 5 ปีที่แล้ว +87

    The flow of this explanation and the explanation itself is so smooth and very well done. Honestly an amazing job by this man. Thank you.

  • @MewTheGamer
    @MewTheGamer ปีที่แล้ว +2

    this deserves way more attention. i was looking around online for similar resources and could find nothing but awfully explained bloated messes of solutions that sometimes contained errors and wouldnt even compile. then i watched this video and i now have a real understanding of the topic that i can actually build on, not to mention the complete lack of errors or warnings. thanks for this tutorial!

  • @christague2084
    @christague2084 2 ปีที่แล้ว +15

    This video was unbelievably helpful. The way you explain things is fantastic, and I learned more in 40 minuets with you than full university courses!

  • @nolanrudolph5463
    @nolanrudolph5463 5 ปีที่แล้ว +15

    I'm so happy I could cry, you made my month

  • @Eduonix
    @Eduonix  3 ปีที่แล้ว

    100% Discount for binge learners!
    Learn your favourite skills at cutt.ly/WzL60do and get a flat 70% site-wide discount and an extra 30% cart discount on your purchase.

  • @nlmaster9811
    @nlmaster9811 3 ปีที่แล้ว +2

    Doing a web server for a clour computing course and this video is more informative than my entire network programming class. -_-
    Thank you!

    • @Eduonix
      @Eduonix  3 ปีที่แล้ว +1

      Thank you for watching the video. Now you can learn courses for Free. Eduonix has come up with the subscription plan - Infiniti. For a limited time, we are offering 1 Month Free Subscription, where you can learn the course you are desperately looking for, as well as 2000+ other courses for Free.
      Click the link to get your free subscription: bit.ly/2OuM9EY

  • @BatteryProductions
    @BatteryProductions 5 ปีที่แล้ว +3

    this is the best c sockets video i have found! thanks a lot!!

    • @Eduonix
      @Eduonix  5 ปีที่แล้ว

      We are glad it helped!! Subscribe for more.

  • @PL___
    @PL___ 5 ปีที่แล้ว

    this is way way way better than 80 minutes lecture in class and does not make me wanna kms ........ 💯 thank you a million.

    • @eduonixsupport1889
      @eduonixsupport1889 5 ปีที่แล้ว

      You're most welcome, Prakort!!! Subscribe for more videos.

  • @unboxstv
    @unboxstv 2 ปีที่แล้ว

    This is the best free software Ive seen. Respect.

  • @thisisreallyme3130
    @thisisreallyme3130 ปีที่แล้ว +2

    Whoa... this is REALLY good! I've watched a few tutorials on this subject. This one feels rehearsed, and it both proactively tackles likely viewer questions, and at the same time avoids getting lost with improv explaining (doesn't go off the path). Subscribed!
    Only suggestion I have is improve the "still image" we see in TH-cam results (based on that image.. plus the logo.. I made incorrect assumptions about the content and speaker).

  • @Rick_Aye
    @Rick_Aye 2 ปีที่แล้ว

    Holy shit, guy. If only all programming tutorials were like this.

  • @mercystrength5477
    @mercystrength5477 5 ปีที่แล้ว +14

    I wish there is a fanciful way to say thank you. Thanks a lot!!!

  • @sangeeththiruvoth8345
    @sangeeththiruvoth8345 4 ปีที่แล้ว +2

    Finally! someone who actually explains socket programming meaningfully

  • @wandererstraining
    @wandererstraining 4 ปีที่แล้ว +7

    What a great tutorial! Thank you so much for making it. I just did a series of (free) courses to learn the basics of C, and I thought a fun next thing to learn would be sockets. Thanks to your tutorial, I feel like I'm getting a nice start with it. I'll also check the references, because I want to know all the options!

  • @shashankbarthwal858
    @shashankbarthwal858 6 ปีที่แล้ว +13

    Thanks for the great explanation sir! This is the only video on youtube that taught me basics of socket programming practically so well :-)

    • @Eduonix
      @Eduonix  6 ปีที่แล้ว +1

      We are glad it helped !! Subscribe for more.

  • @user-hz7hp1dj1k
    @user-hz7hp1dj1k 5 หลายเดือนก่อน

    It's extremely helpful, clear and well-structured explanation video for socket!!
    THANK YOU..!

  • @simileoluwaaluko7582
    @simileoluwaaluko7582 6 ปีที่แล้ว +13

    nice tutorial for beginners. am totally new to socket programming, and this made sense! Just to add, I got an error while using the close() method. to fix that add #include to your headers

    • @Eduonix
      @Eduonix  6 ปีที่แล้ว +1

      Thank you for your valuable insight! Subscribe for more tutorials! :)

    • @baqirhusain5652
      @baqirhusain5652 5 ปีที่แล้ว

      Thanx

  • @AwesomeRattyBoy
    @AwesomeRattyBoy 6 ปีที่แล้ว +149

    Vegeta what was the port number? ..... It's over 9000!!!!

    • @eduonixsupport1889
      @eduonixsupport1889 6 ปีที่แล้ว

      its 9002 port is using.

    • @tushardm1729
      @tushardm1729 6 ปีที่แล้ว +1

      haha xD

    • @cloveramv
      @cloveramv 6 ปีที่แล้ว +4

      Love Vegeta and Networking !
      *MY KINDA GUY !*
      join my discord server - discord.gg/e6QGH2F

    • @govindsurti7591
      @govindsurti7591 6 ปีที่แล้ว

      What do you think the port number should have been? Also, please share why. Thanks!

    • @potatohater5599
      @potatohater5599 6 ปีที่แล้ว +4

      you don't get it and you never will, so don't ask

  • @shahadalrawi6744
    @shahadalrawi6744 6 ปีที่แล้ว +4

    Clear, neat and helpful ... THANK YOU, YOU SAVED MY LIFE

    • @Eduonix
      @Eduonix  6 ปีที่แล้ว

      Oh thank you Shahad! We are glad we could help! Subscribe for more 'life-saving' videos!

    • @Drqonic
      @Drqonic 5 ปีที่แล้ว +1

      I highly doubt your life was on the line here...

  • @janzcarr
    @janzcarr 6 ปีที่แล้ว +5

    I'm really grateful that you created this tutorial. Good job! Keep up the good work.

    • @Eduonix
      @Eduonix  6 ปีที่แล้ว +2

      Thank you Jan, subscribe for more tutorials!

  • @NidraxGaming
    @NidraxGaming 2 ปีที่แล้ว +3

    9:54 for the sake of consistency in using header's enums, I'd recommend IPPROTO_IP instead of explicit 0.

  • @vihaanchettri5423
    @vihaanchettri5423 3 ปีที่แล้ว

    Thanks a lot. It means a lot. because i had to give my practical on this and our professor did not have sufficient time to give lectures on this topic due to covid19.

    • @Eduonix
      @Eduonix  3 ปีที่แล้ว

      Thank you for watching the video. Now you learn full courses for Free. Eduonix has come up with the subscription plan - Infiniti. For a limited time, we are offering 1 Month Free Subscription, where you can learn the course you are desperately looking for, as well as 2000+ other courses for Free.
      Click the link to get your free subscription: bit.ly/3t0vqbz

  • @Rajjain_
    @Rajjain_ 3 ปีที่แล้ว

    Each word carefully explained

  • @AdmiralHattori
    @AdmiralHattori 4 ปีที่แล้ว +8

    If anyone gets an error about using the close() function to close the socket, I added to the include files "include ". I'm running my program on a Mac with Xcode's gcc compiler.

    • @Tobelob2
      @Tobelob2 4 ปีที่แล้ว

      Ubuntu here. Same problem and same fix. Thanks!

    • @bobobopan2354
      @bobobopan2354 4 ปีที่แล้ว

      Ubuntu. I fixed it by changing .cpp to .c

    • @wandererstraining
      @wandererstraining 4 ปีที่แล้ว

      Same with Linux Mint!

  • @vaiebhavpatil2340
    @vaiebhavpatil2340 2 ปีที่แล้ว

    this was really helpful. my college professor wasn't able to explain in this ordered manner, they were just jumbling things up and it wasn't really clear, after watching this video after that lecture, everything has cleared up. great lecture. subscribed.

  • @neol07707
    @neol07707 11 หลายเดือนก่อน

    Really good tutorial, may I suggest as a minor improvement when you mention how you can detect errors when the call to connect returns -1, you can find out more detail about the specific error that happened by including the errno along with the errno converted to a string. The errno information will give you a more precise reason on why a network operation failed which can be very helpful for troubleshooting. This works in general for all the network api function calls.

  • @hovhadovah
    @hovhadovah 10 หลายเดือนก่อน

    This was an excellent tutorial, thanks!

  • @ShivamKumar-qk3vd
    @ShivamKumar-qk3vd ปีที่แล้ว

    Excellent tutorial man...

  • @monson2048
    @monson2048 ปีที่แล้ว +1

    Amazing content, extremely helpful!

  • @hanac5586
    @hanac5586 2 ปีที่แล้ว

    I had to miss a lecture today on this, lovely content! Good pace and clear explanation.

  • @sajadtorkamani9399
    @sajadtorkamani9399 2 ปีที่แล้ว

    Thanks, this was a pleasure to watch.

  • @Ken-yb5ku
    @Ken-yb5ku ปีที่แล้ว

    literally saved my life

  • @rahulaga
    @rahulaga 10 หลายเดือนก่อน

    thanks for sharing quality knowledge. small suggestion - probably bit of zoom in and using some other editor or different background color would improve watching experience and more soothing, thanks !!

  • @jean-eudesc2lol447
    @jean-eudesc2lol447 3 ปีที่แล้ว

    Nice ! I was waiting for this for a long time ! Congratulations !

  • @omnipotentvoice6537
    @omnipotentvoice6537 5 ปีที่แล้ว

    You sir are a bloody life saver. God bless your soul.

    • @Eduonix
      @Eduonix  5 ปีที่แล้ว

      We are glad it helped. Subscribe for more!!

  • @michaelswahla4927
    @michaelswahla4927 2 ปีที่แล้ว

    Amazing video on sockets in C for beginners. You just earned a sub! Thank you so much!!

  • @martinmaartensson
    @martinmaartensson 3 ปีที่แล้ว +6

    Thank you, this is an awesome video in just the right tempo for me. There are some things I was wondering though.
    I got a problem with the close function, so I imported to avoid getting a warning. and then instead of closing "sock" then I closed "network_socket" as you said that that was the file descriptor.
    Maybe it would be nice if you added that as a note or something in the video.
    Again thank you. It it a very nice video

  • @cybergenv4560
    @cybergenv4560 4 ปีที่แล้ว

    thank you for taking the time to make this video, it made my life much easier.

  • @potatopotato7561
    @potatopotato7561 4 ปีที่แล้ว

    dude you're a real one

  • @ajinkyakale4391
    @ajinkyakale4391 ปีที่แล้ว

    Whoa! this tutorial is so good!

  • @pwny4995
    @pwny4995 6 ปีที่แล้ว +1

    Thank you for this tutorial, can you give a recommendation for further reading on this?

  • @abdullahbabor4876
    @abdullahbabor4876 4 ปีที่แล้ว

    Thank You! It was pretty good explanation

  • @LeFede
    @LeFede 6 หลายเดือนก่อน

    how different is it on a windows machine?

  • @normbograham3
    @normbograham3 3 ปีที่แล้ว

    I guess we are going to ignore Nagle, and man in the middle. (lol), not to mention multiplexing (multiple sockets). I know right....with each "detail", comes more complexity. But, knowing whom is connecting is an important security feature. I found this to be a great way to spend my 3:20 am awake time.

  • @arielsilver7005
    @arielsilver7005 2 ปีที่แล้ว

    GREAT video!!!

  • @techmedia1360
    @techmedia1360 4 ปีที่แล้ว +1

    GREAT GREAT VIDEO! THANK YOU :)

  • @cyrilledebongnie8577
    @cyrilledebongnie8577 5 ปีที่แล้ว

    You're a hero, many thanks

  • @lwinmoe1997
    @lwinmoe1997 2 ปีที่แล้ว

    I have a question. I'm on windows platform . My Mingw compiler don't have file . Where can I find these header/source files and how to install it to use ?

  • @FeedehC
    @FeedehC 2 ปีที่แล้ว

    Thanks a lot this tutorial is great!

  • @get_ready
    @get_ready 7 ปีที่แล้ว +1

    Great video indeed. Well explained. Thanks!

    • @Eduonix
      @Eduonix  7 ปีที่แล้ว

      Thank you. Subscribe us to get updates on latest courses.

  • @biancadragomir
    @biancadragomir 7 ปีที่แล้ว

    nice tutorial! the best one i could find until now

    • @Eduonix
      @Eduonix  7 ปีที่แล้ว

      We're glad you found it useful Bianca! Subscribe for all the latest updates.

  • @roronoazoro6153
    @roronoazoro6153 4 ปีที่แล้ว +5

    When I try it, with the exact same code that you wrote, it won't always connect to the server side and get connection errors from the client. What is the problem here?

  • @alles_muss_anders_werden
    @alles_muss_anders_werden 3 ปีที่แล้ว +2

    You should include the following line
    #include
    to prevent messages like this:
    " warning: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Wimplicit-function-declaration]
    close(network_socket);"

    • @xavierhenschel55
      @xavierhenschel55 2 ปีที่แล้ว

      any idea why he does not need to include that?

  • @omarhalabi889
    @omarhalabi889 4 ปีที่แล้ว

    thank you so much teacher

  • @danielanderson222
    @danielanderson222 2 ปีที่แล้ว

    great tutorial.

  • @Kim-rh9gt
    @Kim-rh9gt 3 ปีที่แล้ว

    best lecture , thank you

  • @david2358
    @david2358 2 ปีที่แล้ว

    excellent tutorial!! 👍

  • @robbievalentine8864
    @robbievalentine8864 4 ปีที่แล้ว

    THanks for the video! Great job!

  • @mohammadbilal2535
    @mohammadbilal2535 4 ปีที่แล้ว

    Very well explained!! thanks

  • @dark_red_blood
    @dark_red_blood ปีที่แล้ว

    Thank you, you are amazing

  • @anithegreat5926
    @anithegreat5926 5 ปีที่แล้ว +4

    One of best explanation. Going to try your code along with my experimental code in addition. Thanks a lot to make me understand socket programming in one shot.. :)

  • @halavich9672
    @halavich9672 5 ปีที่แล้ว

    Awesome! All clear

  • @jnihadahmed
    @jnihadahmed 2 ปีที่แล้ว

    Thank you.

  • @e1ghtSpace
    @e1ghtSpace 6 ปีที่แล้ว

    Thank you very much. This saved me a lot of time.

    • @eduonixsupport1889
      @eduonixsupport1889 6 ปีที่แล้ว

      We are happy to help you. Subscribe for more videos.

  • @normbograham3
    @normbograham3 3 ปีที่แล้ว

    your recv function, uses the buffer, char server_response[256]. So, the address of the buffer, is server_response. You used &server_response. which is wrong! yet it works for a quirky reason. The address of the array, is also the address of the first element .

  • @baswarajsghali2074
    @baswarajsghali2074 3 ปีที่แล้ว +1

    include unistd.h in your header and instead of sock write network_socket for errors in close function.

  • @barneyjin4563
    @barneyjin4563 3 ปีที่แล้ว

    well explained!

  • @FivosTheophylactou
    @FivosTheophylactou 2 หลายเดือนก่อน

    Basic TH-camr: If you have any questions write them in the comments.
    Eduonix: RTFM!!!

  • @mohithvegi963
    @mohithvegi963 6 ปีที่แล้ว +4

    If your are getting warnings for close statement, also include unistd.h

    • @Eduonix
      @Eduonix  6 ปีที่แล้ว +2

      Thank you for your valuable insight. Stay connected for the latest updates!

  • @mercygotnerfed315
    @mercygotnerfed315 2 ปีที่แล้ว

    Is it possible to send a FILE that was fopen ? Should i read it into a buffer or i can just send it like that ?

  • @hubble6487
    @hubble6487 7 ปีที่แล้ว +52

    Great class!
    "We are going to use VIM to keep it SIMPLE" - vim? simple? there is no such thing

    • @KingUnity22
      @KingUnity22 7 ปีที่แล้ว +3

      vim is just an editor right? what makes it complicated? I'm totally new to network programming so please don't tear me apart for asking.

    • @HiAdrian
      @HiAdrian 7 ปีที่แล้ว +5

      *+UnityPlays* I think OP's criticism is with regards to vim's exotic controls, they're a big hurdle for those not familiar with it.

    • @AlqGo
      @AlqGo 7 ปีที่แล้ว +11

      Vim is great! Praise it! Praise it!

    • @spaghettipunch2681
      @spaghettipunch2681 6 ปีที่แล้ว

      amen

    • @Zander101084
      @Zander101084 6 ปีที่แล้ว +3

      It's not an IDE. All your build steps are on the command line is the point. Just use sublime text or whatever you want.

  • @deeliciousplum
    @deeliciousplum 6 ปีที่แล้ว

    Wonderful tutorial. I have an exceptionally basic level of C programming. With that said, your tutorial was clear, covered the background info on what was needed for the tasks being enabled, and might I say that this server/client exercise worked on my elderly macbook with OSX 10.5.8 and a PPC processor. Thank you! I had never thought to explore how I can pass data between two or more apps. This will do nicely. Than you again.

    • @eduonixsupport1889
      @eduonixsupport1889 6 ปีที่แล้ว

      We're glad we could help you. Subscribe us to get updates on latest courses.

  • @gunmastertarun
    @gunmastertarun 6 ปีที่แล้ว

    Thanks it was really helpful for our mini project

    • @Eduonix
      @Eduonix  6 ปีที่แล้ว

      We are glad it helped !! Subscribe for more.

  • @donha475
    @donha475 4 ปีที่แล้ว +321

    Tutorial for beginners... "we're going to use vim as the editor just to keep things simple". LOL!

    • @ElMaestro1508
      @ElMaestro1508 4 ปีที่แล้ว +4

      #respect for him

    • @imbalos
      @imbalos 4 ปีที่แล้ว +93

      if a person is competent enough to get to writing c sockets, I'd assume he is competent enough to figure out a text editor.

    • @patlecat
      @patlecat 4 ปีที่แล้ว +15

      C coders are very old school they love to use antique software and pretend it's as comfortable and feature rich as any modern software. LOL

    • @onlylikenerd
      @onlylikenerd 4 ปีที่แล้ว +40

      If you get stuck in vim just restart your PC and you'll get out of it

    • @Kourto
      @Kourto 4 ปีที่แล้ว +32

      I use VIM since a year,... Since I never found how to exit VIM...

  • @amishasingla9862
    @amishasingla9862 5 ปีที่แล้ว +1

    Thanks a lot sir, you were a great help.

    • @Eduonix
      @Eduonix  5 ปีที่แล้ว

      glad ! it was of help, subscribe for more such videos! :)

  • @volkerking5932
    @volkerking5932 3 ปีที่แล้ว

    Hello I've a question about the TCPclient why my tcpclient is writing on question to the TCPserver this => The server send the data: ��Lf
    There come characters that should not be there - I think it could be maybe the UDF-8 Terminal emulation or a other problem sometimes the TCPclient don't answer anything.
    How I can read the server_socket if I make a printf only '3' is coming out but there are two values AF_INET and SOCK_STREAM or? Thank you for helping I'm new in thissocket programming. Best Regards Volker from Vienna

  • @effsixteenblock50
    @effsixteenblock50 5 ปีที่แล้ว +1

    I'm very familiar with network protocols and have done a lot of experimentation with netcat, sending custom made files that would contain the appropriate headers / payloads that would essentially "ride" on top of TCP/IP that netcat was taking care of for me. Of course, the limitation here is that though you will receive a server response, that's where the session ends. I can envision how I might do this programmatically Bash, parsing the response header and payload and creating a new file based on the response. The obvious problem is that if I just sent the new file (again riding on TCP/IP via netcat, a new TCP handshake would happen), which of course, would start a new connection which is not going to work. Also, I've done a few simple programs in C, understand the basics - data types, flow control, pointers etc. But the examples I've seen of structs are nothing like what I see he's using here - the structs I've seen declared a name and then had a list of disparate data types listed inside curly braces. Here, he's got 2 different variables separated by a space and is even using dot syntax - it looks like an object! I want to be able to parse custom headers, and send custom payloads (binary). Sorry for the long post but I'm hoping someone can point me in the right direction. It would be great if I could accomplish this in Bash but maybe I should tackle Java and write a Burp extension. Thoughts?

    • @eduonixsupport1889
      @eduonixsupport1889 5 ปีที่แล้ว

      Please refer to the following link mentioned below. It might help you get some idea about your query.
      hpbn.co/websocket/

  • @normangraham235
    @normangraham235 3 ปีที่แล้ว

    If you are lost by this "introduction", you'd, really be lost when Nagle is introduced. Basically put, TCP/IP, is a stream, you cannot be assured that one read or write successfully wrote the entire thing you wanted. Or it might have read more then one. Thus, you first gotcha with sockets, is to define your own socket header, so, you know how many bytes to expect. Then the next fun event, is when you need to also poll, your writes (lol). So, the simple implementation is trivial, but the details keep adding more and more complexity. what happens when the plug is pulled on the other side, lol. etc, etc.

  • @rockababy
    @rockababy 4 ปีที่แล้ว

    Great stuff.

  • @tylerjowers4667
    @tylerjowers4667 6 ปีที่แล้ว +4

    I got a warning from the compiler for the close() function, I don't think it was defined in the headers so I put the unistd.h header. Anyone watching this I would probably #include because otherwise I'm not sure if your socket will be closed at the end.

    • @eduonixsupport1889
      @eduonixsupport1889 6 ปีที่แล้ว +1

      If your are getting warnings for close statement, include unistd.h

  • @muhammadsafiullah8428
    @muhammadsafiullah8428 5 ปีที่แล้ว

    Helpful video.

  • @smrtfasizmu6161
    @smrtfasizmu6161 2 ปีที่แล้ว

    In Java you only have to specify ip address and port. You have to write smaller amount of code in order to do the exact same thing. Although you do need to use dataInput(Output)Stream or BufferedInput(Output)Stream in order to receive/send data.

  • @kaus05
    @kaus05 ปีที่แล้ว

    What was the htons function used for ? I didn't quite get that

  • @benjaminbezard5314
    @benjaminbezard5314 4 ปีที่แล้ว

    thank you for this tutorial !

  • @kartiksikka3866
    @kartiksikka3866 7 ปีที่แล้ว +1

    Thank you so much , for such a nice tutorial :)

    • @Eduonix
      @Eduonix  7 ปีที่แล้ว

      Welcome, Kartik. Subscribe us to get updates on latest courses.

  • @itsjinji
    @itsjinji 6 ปีที่แล้ว +1

    Super helpful, clearly explained and concise! Thanks for much :)

    • @Eduonix
      @Eduonix  6 ปีที่แล้ว

      Thank you, we're glad we could help. Subscribe for more tutorials!

  • @radoslavdimitrov7505
    @radoslavdimitrov7505 ปีที่แล้ว

    5:00 will it compile for Windows using LLVM-CLang and Visual Studio?

  • @araujo_88
    @araujo_88 3 ปีที่แล้ว

    This is high quality content. Thank you very much. Learning a lot from this.

  • @workinglearner4238
    @workinglearner4238 7 ปีที่แล้ว +1

    best class for beginners

    • @Eduonix
      @Eduonix  7 ปีที่แล้ว

      We're glad it was helpful Chaitanya! Subscribe for latest updates.

  • @naviddaneshvaran5411
    @naviddaneshvaran5411 6 ปีที่แล้ว

    Thanks, very helpful

    • @Eduonix
      @Eduonix  6 ปีที่แล้ว

      Your welcome!! Subscribe for more.

  • @StreetboyOfficiel
    @StreetboyOfficiel 5 ปีที่แล้ว

    perfect thanks

  • @baubi4260
    @baubi4260 3 ปีที่แล้ว

    thank you so much!!!!!!!

  • @kishorereddykancherla8210
    @kishorereddykancherla8210 3 ปีที่แล้ว

    how did close(sock) work for you..? there is no socket with that name..?

  • @thinkinganame6173
    @thinkinganame6173 6 ปีที่แล้ว

    great video!! just for feedback, it would be great if you use a different foreground and background colors

    • @Eduonix
      @Eduonix  6 ปีที่แล้ว +1

      Hi Ali, we will definitely be considering your suggestion, Thanks!

  • @shekharmaela2308
    @shekharmaela2308 3 ปีที่แล้ว

    What did you mean by you can connect to your own system at 0.0.0.0? the loopback IPv4 address is 127.0.0.1, and the IPv6 version is ::1...

  • @ECT155
    @ECT155 6 ปีที่แล้ว

    Excellent tutorial, clear and flows nicely. Thank you.

    • @Eduonix
      @Eduonix  6 ปีที่แล้ว

      Thank you Edward! Subscribe for more tutorials!

  • @indianjitsingh8838
    @indianjitsingh8838 2 ปีที่แล้ว

    the port number is over 9000!

  • @EmanuelAB98
    @EmanuelAB98 6 ปีที่แล้ว

    Very clear explanation. It helped me a lot. Thanks man !!

    • @Eduonix
      @Eduonix  6 ปีที่แล้ว

      You're welcome, Emanuel! Subscribe for more tutorials!

  • @david13get
    @david13get 4 ปีที่แล้ว

    can you use this with a sockaddr_ll structure instead of sockaddr_in? I'd like to be able to send IP packets without knowing the actual port but the interface name instead