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
- Sockets Overview
- TCP Server
- TCP Client
- Handling Multiple Clients