Changes between Version 1 and Version 2 of getfileII


Ignore:
Timestamp:
03/02/12 08:14:46 (9 years ago)
Author:
branden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • getfileII

    v1 v2  
    4949The TimeZone parameter is only used on Windows NT for timestamping entries in the log file. 
    5050 
    51   
    52  
     51{{{ 
    5352# 
    5453 
     
    118117 
    119118#-LogFileName c:\earthworm\run\log\sendfileII.log 
    120  
     119}}} 
    121120  
    122121 
     
    135134 
    136135The TimeZone parameter is used only for timestamping entries in the log file. 
    137  
     136{{{ 
    138137# 
    139138 
     
    199198 
    200199-Client 130.118.43.38 /home/earthworm/indir/campbell 
    201  
     200}}} 
    202201  
    203202 
     
    209208The makehbfile program makes heartbeat files and places them in a specified directory. The output directory should be the same as the sendfileII queue directory, and it must exist before running makehbfile. Makehbfile uses a directory named "temp.dir" for creating its heartbeat files before moving them to the output directory. It will create this directory within theoutput directory if it does not exist at startup. The makehbfile program requires a configuration file, typically named makehbfile.d. A sample configuration file is included in the distribution directory and is shown below. Any line which begins with the # sign is interpreted as a comment, so feel free to add your own comment lines. 
    210209 
     210{{{ 
    211211# 
    212212 
     
    234234 
    235235#-Path c:\earthworm\outdir 
     236}}} 
    236237 
    237238All heartbeat files will be created with the same name, as specified in the makehbfile configuration file. If a heartbeat file already exists in the output directory, it will be overwritten by the most recent heartbeat file. 
     
    242243=== PROTOCOL === 
    243244 
    244 SendfileII and getfileII use the following protocol for transferring files. GetfileII opens its socket to listen on the TCP "ServerPort". When sendfileII has a file to send, it will make a connection to the getfileII socket. Each "block" of data that sendfileII sends is preceded by a six-digit integer indicating the block size. SendfileII first sends the name of the file it is about to transmit (preceded by the name length as described above). It then sends blocks of 4096 characters of file contents (or the remaining file contents if less than 4096) to getfileII. Again, each block is preceded by its size. 
    245  
    246 After sendfileII has completed sending the file, it sends one more six-digit integer of zeros, to indicate that the file transmission is complete. When getfileII accepts the connection from sendfileII and receives the file name, it will create a new file by this name in TempDir. GetfileII will then write the data it receives from sendfileII into this file. When getfileII receives the file block size of zero, it will close the file in TempDir and move it to the directory for the client from which it received the file. GetfileII will also send the three characters "ACK" back to sendfileII when getfileII has successfully written the file to disk in TempDir. 
    247  
    248 If getfileII has errors receiving the file data, sending the "ACK", or times out receiving or sending, it will close its active socket, delete the file from TempDir, and go back to listening for client connections. If sendfileII has errors connecting to getfileII, has errors sending the file, or cannot send a packet within "TimeOut" seconds, it will close its socket, wait for "RetryInterval" seconds, and make another attempt to send the file. It will keep trying to send the file until it has received and acknowledgment from getfileII. 
     245SendfileII and getfileII use the following protocol for transferring files. GetfileII opens its socket to listen on the TCP "!ServerPort". When sendfileII has a file to send, it will make a connection to the getfileII socket. Each "block" of data that sendfileII sends is preceded by a six-digit integer indicating the block size. SendfileII first sends the name of the file it is about to transmit (preceded by the name length as described above). It then sends blocks of 4096 characters of file contents (or the remaining file contents if less than 4096) to getfileII. Again, each block is preceded by its size. 
     246 
     247After sendfileII has completed sending the file, it sends one more six-digit integer of zeros, to indicate that the file transmission is complete. When getfileII accepts the connection from sendfileII and receives the file name, it will create a new file by this name in !TempDir. GetfileII will then write the data it receives from sendfileII into this file. When getfileII receives the file block size of zero, it will close the file in !TempDir and move it to the directory for the client from which it received the file. GetfileII will also send the three characters "ACK" back to sendfileII when getfileII has successfully written the file to disk in !TempDir. 
     248 
     249If getfileII has errors receiving the file data, sending the "ACK", or times out receiving or sending, it will close its active socket, delete the file from !TempDir, and go back to listening for client connections. If sendfileII has errors connecting to getfileII, has errors sending the file, or cannot send a packet within "!TimeOut" seconds, it will close its socket, wait for "!RetryInterval" seconds, and make another attempt to send the file. It will keep trying to send the file until it has received and acknowledgment from getfileII. 
    249250 
    250251