Image missing.
TCP, the workhorse of the internet

created: Nov. 15, 2025, 6:37 a.m. | updated: Nov. 16, 2025, 12:01 p.m.

Some Code: A Plain TCP ServerWith all low-level things like TCP, C examples are the way to go. ACCEPT : accept an incoming connection (TCP Server): accept an incoming connection (TCP Server) CONNECT : attempt connection (TCP client): attempt connection (TCP client) SEND : send data: send data RECEIVE : receive data: receive data CLOSE : release the connectionIn the example above, we’re using client/server dynamics in a request/response pattern. The server sent not a response, just doing my thing , then picked up my second TCP packet and replied with you sent: client again . We’re establishing a TCP connection and returning the HTTP headers expected by the HTTP client (the TCP peer, really). With the example above, running ss (Socket Statistics) provides info about the TCP connection.

2 days, 23 hours ago: Hacker News