Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

close connection to port

Status
Not open for further replies.

oceandeep

IS-IT--Management
Jul 6, 2000
69
GR
Hi,

I am doing some tests of my programme to see what would happen if the connections broken. So are there any unix commands can be used to close the connection to certain ports/socket without shutting down the interface?
Thanks!
 
Sorry no idea about closing ports (terminate the daemon which listens on that port perhaps?), but this post is related to a problem I'm having where the rlogin connection to remote machine appears to be being terminated after a certain amount of time. If I do not input to the remote machine for a while, the next time I do I get this message: "Read error from network: Connection reset by peer". It always seems to happen after a certain amount of time, i.e. if I'm working on it continuously it does not disconnect, making me think it's a time-out issue. The remote host is connected via the internet, so is on a different network, if that makes any difference. The remote is NOT being rebooted all the time, which

I could always test your program on my two machines if you want;)
 
You could use a firewall to break the connection. There are several.

Allow the connection to be established and then change the firewall rules to not allow it.

Matthew

Family motto: Curvus, non infractus.
The Universe: God's novelty screensaver?
 
Thanks a lot guys. In fact my programme is about two processes running on the same machine, one acts as a master piece, while the other one is a client. The client connects to the master through certain ports. If the client detected the loss of connection, it will try to reconnect. So what I want to test is when the link broken, what will happen. But the problem is they are running on the same machine, how can I cut their connection?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top