I wrote a sample client and server, the server keeps listening to the client when the client connects, sends the request and then disconnects. When a client connects to the server and before sending the request, the server is forced to shut down or in any way. My question is how can I handle it? Can I disconnect it from the server until it is notified to the connected client? Can I write such a law? How to do?
Edit: By server and client I mean server and client applications I have written myself
Please clarify your position
server
Does your server application or physical server only mean? If the server means o / o, then you can not do anything other than completely troubleshooting software and hardware. Update:
OK, if this is your problem, then you can try to apply Try..Catch statement in your code and with the exception being raised Learn more for
The issue is, instead of solving the exception, you should stop the exception at the first place.
Since you are in control of both server and client applications, you can use a comet approach to monitor server application status, i.e. the server is still running, or closed is.
For more information about the concept of comet approach, here is the link:
Comments
Post a Comment