I am working on a TCP socket server for a client and i am having a problem. Everything works except for one thing: i can't figure out how to have the server tell the client that the server is going down.
I have the SocketServer running as a windows service. It starts and stop just fine. I also wrote a test program that connects to the Server and fetchs data from a MySQL db. Now, The SocketServer itself will be restarting once each week. However, the program that will be connecting to it is provided by a 3rd party vendor. So I can't really control how the connections happen. The program they are running is designed to always be running. What i need is a way to send their program a signal that says " the server is restarting". they are willing to modify their program to create connections after they are lost.
The problem is getting the server to send any kind of signal like that. I can't send some text that says the server is going down. I have to find a way to tell their socket to close itself ( or something similar )
any ideas?
(and im new, hello )