Click here to Skip to main content
15,881,967 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have written a program for connecting client to server for capturing client screen. In that client will send their desktop screen to server. When i close the server client screen capture will be running . My problem is when i close i want the client to close the connection and reopen the socket for connecting to server. If you need the code i will post but it is little bit big because of swing application . if you need i can post the code. Give me any solution for this problem.
Posted

1 solution

Where is the problem? your client should retrieve from the server the last command that is forcing the clients to close the connection and open a new one to listen for new server connections. When the server comes back on, it will notify the client and the connection is established again.

You could also force the client to try to connect from time to time until it succeeds. A little tricky cause you need to catch the exceptions silently during this.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900