Original Post
my professor wants me to make a program that will read a file from disk, write it to a file, and also read from the same file at the same time. Now, he says to implement this as a FIFO buffer. but i have a few questions. why would i want to write this sort of file as a copy of it to another file "buffer"? wouldn't it be better to do the entire FIFO buffer in memory? i thought that's the way it was supposed to be done. also, wouldn't the program reading from the same file be a different program than that which writes to the file? i'm having difficulty in seeing the reason for this.
what i'm supposed to try and accomplish is sending the the file to a buffer that will then read this "buffer" on disk across a network, and then save it over there. now, i think this was supposed to be a live stream MPEG file that i was supposed to be encapsulating in RTP, but i think he just said to copy the bytes of the MPEG file, and then send it across the network, where the streaming server is, and then the server will do the rest. so i'd just be sending a file from the "content creator" machine, and sending the content to the server machine to be distributed. this implementation that i describe above sounds pretty hokey to me. why can't you just open the MPEG file, send the file packets at a time with winsock, and then be done with it? why all this FIFO and external buffer file? i don't get it.
thanks for any explanations.
allan
Edited by - a2k on April 12, 2001 2:10:21 AM