gcc

Non Blocking I/O using SELECT System Call in Linux

Today we are going to explore a very important system call in Linux, The Select system call. Select System call is use  when we need non blocking executions. The use of the select can be explained via an example code. Lets assume that we use a socket program with a server and few client programs. …

Non Blocking I/O using SELECT System Call in Linux Read More »

Producer Consumer Problem in C++

Today I’m going to solve a most common problem which is known as the consumer producer problem. In this context we have a shared buffer which the producers produce and the consumers consume. The consumers and producers are threads which will simultaneously produce and consume. There are some conditions to be met where consumers have …

Producer Consumer Problem in C++ Read More »

How to send Complex Data Structures in a Socket Program

Hi all, Hope you guys are doing well. I was busy with my work last few days. Today I’m going to write a post about sending Complex data structures using a socket program. In this post I assume that you are somewhat familiar with the socket programming basics. In the following example we are creating …

How to send Complex Data Structures in a Socket Program Read More »

Network Simulation using NS2

Before deploying a network it is necessary to check how the network would behave after the deployment. After deploying the network sometime it may not function/behave as expected. So it is better to get some idea before the real deployment.  There are commercial simulators of course,  but the problem is that they are very expensive. So NS2 …

Network Simulation using NS2 Read More »