File buffer :)

rmatthew

Well-known member
Joined
Dec 30, 2002
Messages
115
Location
Texas
Not excatly sure what to call what I am asking for :)

I have a program that needs to save a set of strings and when asked requested send those strings to another program over a TCP connection. I need to store those strings such that if the computer is turned off it does not loose any of the strings it has collected since the last call to send (ie. it just picks up from where it was and starts collecting more strings). However, I do not want to duplicate a string once it is already successfully sent and received.

So - what I need is a way to read and write to a file in the same way I would a cue. Again - the reason for the file is to save the data if the machine is turned or more importantly looses power abruptly.
 
Is this for a personal computer, or something on a network? Can you take advantage of Microsoft Message Queuing? Its quite handy is made to store things asyncronously and keep track of things even if machines go out.

Im not sure what youre doing with the strings so Im not sure if this is ideal...

If you want to write to a file, why not just append, with some kind of delimiter so that on machine failure, you could read the file to see where you left off (looking at each previous chunk by delimiter) - or a database for that matter?

-Nerseus
 
Back
Top