Hi,
Are there any linux commands to close a socket conenction between 2 processes ?
eg, I can use the ipcsrm command to clear shared memory etc. Is there anything like that for sockets.
Here is What I want to do :-
I have a TCP Server and a Client. I want to simulate a "Connection reset by peer condition" on the client side. I do not have access to the Server Software.
In my client software, I am doing a block wait on a select().
Under certain circumstances, due to network problems, the connection is reset, but the select() does not return any errors. i.e It is still blocked.
Is there any way I can simulate this ?
I have tried using the shutdown() api call from within my program to close socket communication, but that causes the select to return.
I also thought of pulling the network cable on the client machine, but I dont think that will simulate the error that I want.
Thanks Shahed.