Is the there any way of letting the clients know that the server process has been halted, in case the server was aborted on the other end?
thanks.
ssharish
Is the there any way of letting the clients know that the server process has been halted, in case the server was aborted on the other end?
thanks.
ssharish
Life is like riding a bicycle. To keep your balance you must keep moving - Einstein
If the server exits, won't all the connections close?
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
What is your objective? To have your program gracefully acknowledge a server closing? (I.e. you are writing a game and want the clients to be able to reconnect if Billy's dog starts to chew on his Cat-5 cable between his modem and router?)
I am sorry; I should have made it a bit clearer. I think problem wouldn't be there if it was implemented in C.
My server has been implemented in prolog! What happened when the server aborts is that, it closed all the open ports by the server. Or at least it closed down all the port when it restarts and re-opens it back again! But the stream which were opened doesn’t close, the clients are still reading from those open stream. If I manage to close the stream on the server end and when the client reads it from the closed stream it should return -1, which then I could catch that and close the stream on the client end. And make a new connection.
ssharish
Life is like riding a bicycle. To keep your balance you must keep moving - Einstein