Networking always played a vital role in software industry. We are now in a situation where we cannot live without integrating some kind of network stack into modern softwares. Why is it so important? Because nowadays data no longer resides locally on individual systems rather is being stored on remote sites for which we name it as cloud storage. Nobody cares about the location where it is kept. They just need to get the data whenever they ask for it and no matter where it is stored. This retrieval of data from those data centres and presenting them to users involves the networking layer i.e, client requests the data and server serves it. But how many of us have thought above the implementation of such client-server softwares and their subsequent validation? As we all know, such software products will have to undergo thorough round of testing procedures to make it foolproof. Here comes the importance of socket_wrapper project.
Pre-loading and socket_wrapper
It is a FOSS project aimed at helping the functional test coverage for client-server network stack passing all socket communications using unix domain sockets. As the name suggests it is a wrapper around almost all Continue reading
Note:- This article is an example walk-through written for developers keeping in mind that you are aware of very basic network/socket programming concepts.
All of you must have heard about file descriptors or popularly known as fds in Unix world. It is basically an index/indicator generally used to provide access to files, network sockets etc. File descriptor will always be a non-negative integer which has been part of POSIX standard from old days. Accordingly we have 3 standard POSIX file descriptors namely standard input or stdin with value 0, standard output or stdout with value 1 and standard error or stderr with value 2. Standard I/O library from C allows us to create fds via different system calls like open(), creat(), socket(), socketpair(), pipe() etc. For example, if we want to write some data into a file we normally invoke open(2) or create(2) to have an open file descriptor and subsequent write(2) operation is performed via that fd. Finally when we are done with operations we close the fd.
That’s all about some basic file operations work flow. On the other side we have Unix Domain Sockets which is commonly used for data communications between processes Continue reading