
Write a TCP Client in C with connect
Write a TCP client in C that calls socket and connect, sends a request, reads the reply until the server closes, and handles errors on Linux.
Tag
44 posts

Write a TCP client in C that calls socket and connect, sends a request, reads the reply until the server closes, and handles errors on Linux.

Build a TCP echo server in C with socket, bind, listen and accept, handle one client at a time, and check every error on Linux.

Learn file descriptors on Unix and Linux from open and close to dup2, fork, pipes, limits, leaks, passing between processes and the kernel tables behind them.

A socket is a file descriptor for one end of a network conversation. Learn addresses, ports and the Berkeley sockets calls in C on Linux.

A guide to shared memory, semaphores and message queues on Linux: POSIX and System V APIs, layout, locking, robust mutexes, crash recovery, limits and cleanup.

Learn how Unix processes work in C on Linux: create them with fork, replace them with exec, collect them with wait, and end them cleanly with exit.

Learn socket programming in C on Linux from zero: addresses, TCP servers and clients, UDP, getaddrinfo, closing, errors, poll and a working chat server.

How systems code reports, checks, cleans up after and tests failures: errno, short writes, goto cleanup, fault injection and error design in C, Rust and Go.