View Single Post
Old 08-15-2005, 12:26 PM   #3
Khadgar
New Member
 
Join Date: Mar 2003
Posts: 29
Khadgar is on a distinguished road
I have been thinking about the copyover idea and how it might be done.  Please correct me if I am wrong in the following statements.  

Allocated memory will never be freed as long as a process is using it.  In this example, there will be two processes:

Process A is the old instance of the mud server.  As soon as a privledged user types copyover, connected client information, active quest info, mob data, and similar information could be copied to a file. During this period, everything is frozen until process B - the new instance of the mud server - is initiated with the command line parameter "copyover".  Process B could then reinstate the saved data and process A could close.  

I am assuming the sockets will still remain in tact as long as the closesocket() function is never called in process A.  

Since I am working with classes, I could save the memory addresses of clients to a file.  This would be worthwhile if there was a way to retrieve a pointer variable in process B that points to these memory locations.  Is there a way to do this in process B?  If not, would the previous idea work?  Is there a better way to perform a copyover?  Thanks in advance for any help you can provide regarding this issue.

- Khadgar
Khadgar is offline   Reply With Quote