Showing posts fromsockets

C++ Wrapper for Socket

The last two articles examined the "C Socket" interface provided by the OS. In this article, I wrap this functionality in a simple C++ class to provide guaranteed closing and apply a consistent except

Read More

Socket Programming in C

Building a simple client/server application is the standard first internet-based application developers attempt. These applications are built on top of the socket communication library, but socket pr

Read More

Socket Protocols

In the previous articles, I used a very simplistic protocol. In real-world situations, this protocol is not sufficient. A communications protocol is required to provide a more robust connection betwe

Read More

Socket Read/Write

## Checking read/write success The `read()` and `write()` commands can fail in several ways but can also succeed without reading/writing all the data. A common mistake is not checking the amount of

Read More