0Pricing
C Academy · Lesson

Sockets Overview

Network communication basics.

What Is a Socket

A socket is an endpoint for network communication. On POSIX systems it is a file descriptor you can read from and write to, letting two programs exchange data across a network or the same machine.

The Client-Server Model

Most network apps use the client-server model:

  • The server binds to an address and waits for connections
  • The client initiates a connection to the server

Once connected, both sides send and receive data.

All lessons in this course

  1. Sockets Overview
  2. TCP Server
  3. TCP Client
  4. Handling Multiple Clients
← Back to C Academy