TCP Server - Basic Socket Programming Tutorial In C

Posted by Coding Yoda on November 14th, 2018

In this video/blog post I run through creating a TCP Server using C sockets, it's a follow up post to the TCP client post .

Steps for setting up the TCP Server

  • Create TCP socket - Socket()
  • Create Bind the address using Bind()
  • Listen for connections with the listen()
  • Accept a connection with the accept()
  • Send and receive data
  • Close the connection - Close()

socket programming diagram

Thanks for reading/watching and I hope this helps.