I have a server – client pair written in java and I would like to quit one application if the other one is quit. How is this done?
I would also like to know how to make the program do a sequence of commands (e.g. close sockets etc.) if the user quits the application manually (i.e. by pressing cmd+q.alt+F4 etc.)
I have a server – client pair written in java and I would like
Share
When one quits, it send a message to the other which causes it to quit.
One approach is the poison pill message/object which cause the receiver to shut down when that message is reached.