From: drscrypt on 9 Jan 2010 15:55 Hrachya.Aghajanyan(a)gmail.com wrote: > I simplified the code a bit and now can get the file on the server in > the original size. > > ################ Server ######################## > proc receive_file { dir sock addr port } { > gets $sock gzip_file > gets $sock datasize > puts "Receiving file: $gzip_file($datasize)" > fconfigure $sock -translation binary -buffering none > > set fid [open "$dir/layout.tar.gz" w] > fconfigure $fid -translation binary -buffering none -eofchar "" > > while {[gets $sock line] >= 0} { > puts $fid "$line" > } > flush $fid > close $fid > fconfigure $sock -translation auto -buffering line > } > You are not using the file name or the size - Is there a technical reason for including them as the first line during the file transmission? Same thing goes for the sender. DrS
First
|
Prev
|
Pages: 1 2 3 Prev: Very very very new for tcl/tk Next: keyword highlight in text widget |