LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Restore Socket after checkpoint (https://www.linuxquestions.org/questions/programming-9/restore-socket-after-checkpoint-4175428751/)

chercheur 09-24-2012 04:41 AM

Restore Socket after checkpoint
 
Hello,

i have done the checkpoint of an application client server in C with BLCR (Berkeley Lab checkpoint restart), after a failure, i'd like to restart server (server.blcr) and client (client.blcr) but i should recreate sockets betwen new client and new server, have you an idea please ?

Thank you so much.

NevemTeve 09-24-2012 10:27 AM

Don't do any special; use socket(2), bind(2), connect(2), listen(2), etc. the usual way.

chercheur 09-24-2012 11:16 AM

How can i do that please ? because the server.blcr will restart on a new machine so haw the client.blcr will detect the new ip adress of the server

NevemTeve 09-24-2012 11:48 AM

I repeat: use the well-known socket functions to create a new TCP-connection. Of course it will not be the 'resurrection' of the old connection.

chercheur 09-24-2012 11:51 AM

yes i know haw to create socket , but the question haw can tell client.blcr about the new adress ip of the server? i think at first to developp a shared library .. what's your opinion ?

NevemTeve 09-24-2012 12:07 PM

I think restarting as such don't work together with network connection (nor shared files, databases etc) -- it is for long batch processes, to make them interruptible.

chercheur 09-24-2012 12:17 PM

the problème how the client.blcr will detect the new ip adress of the server? have you another idea please ?


All times are GMT -5. The time now is 05:59 PM.