Re: How to force a socket to close ?

From: Paul LAURENT (pl_at_nospam.com)
Date: 07/03/03


Date: 03 Jul 2003 18:56:55 GMT


>> You'd have to find out which process has the port open, and kill that
>> process. Depending on your system, try lsof, fuser, or whatever the
>> system has to show you that.

> I think he's trying to test the application's reaction to losing the
> socket, so I doubt that killing the process would be useful for this
> purpose.

Yes, you are right => I do not want to kill my client process since I want to
test its ability to reconnect after a socket connection loss.

I know that I can shutdown the network interface but all the other people
connected on the same Unix workstation will not be really happy !

I suppose that the socket connection is flagged "active" or "inactive" somewhere
in the Kernel (this is the information we get with the "netstat" command) so
there should be a way to force the socket to close by writing something
somewhere in the Kernel.

PL

-- 
Ce message a ete poste via la plateforme Web club-Internet.fr
This message has been posted by the Web platform club-Internet.fr
http://forums.club-internet.fr/


Relevant Pages