In this hyper-connected electronic world, knowing how to send and receive data remotely with sockets is crucial. In this article, we will see how a socket is essentially a digital “plug” that we can attach to a local or remote address in order to establish a connection. We will also explore the architecture and system calls that allow us to create not only a client but also a server...
Pipe: an Inter-Process Communication Method
By default, it is difficult to get two processes to communicate with each other. As we’ve seen in a previous article, even parent and child processes don’t share the same memory space. So we need to find ways to establish inter-process communication. One of these communication mechanisms is the pipe. What is a Pipe? A pipe is a section of shared memory meant to facilitate the...
Handling a File by its Descriptor in C
The available system calls to create or open, read, write, and delete a file in C all make use of a file descriptor. So let’s discover how the operating system handles references to open files and how to manipulate files in our programs. What is a File Descriptor? In Unix type systems, a file descriptor (fd for short) is a small positive integer used as reference to an open file in a...