views:

366

answers:

3

I've implemented a kind of 'heartbeat solution' and I'd like to see what happen when the network 'goes down', in real conditions, specially if it happens when there is no traffic on the socket.

Problems: - I've got only one computer; - I'm on windows/java;

I guess that simply unplugging the network cable/deactivating the network card won't affect the two processes, as they are running on the same box; Is there a programmatic solution to that? A kind of way to force close a socket ?

+2  A: 

I use TCPView to right click and close sockets.

Richard
Just what I was looking for. Can't thank you enough :)
difiouzz
+1  A: 

if you are using Eclipse, there is a TCP/IP Monitor, WIndow -> Show View -> Other -> type filter text = TCP/IP and create a new forwarding tcp/ip you can monitor and stop that in the middle.

silmx
A: 

You can also simulate two computers with virtual computers.

I use VirtualBox for making myself more computers :D.

egon