ret = listen(connection_socket, 1);
//allowing one connection in queue
I have opened 2 terminals and ran client process in all 2 terminals at the same time.
Here server is busy in processing client1 data, now client2 is in pending queue. Now queue is full.
At this stage, i have launched 3rd terminal and ran client process. Sine queue is full, connect for this client should return -1 and errno should set to ECONNREFUSED,
but in this case, connect is returning 0 for client 3 too. Then what is the purpose of listen()
system call.