Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- From: vitick@xxxxxxxxx
- Date: Sat, 29 Mar 2008 16:38:45 -0700 (PDT)
On Mar 29, 2:23 pm, Darren New <d...@xxxxxxxxxx> wrote:
vit...@xxxxxxxxx wrote:
I am still not sure why my code did not work.
You would need to show the whole of the code, including where you wait
for file events and where you open and close the files. At what line
were you getting "file busy errors"?
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
I deleted my original code, but this one does the same thing with the
same error:
set done 1
set in [open file1]
fconfigure $in -translation binary -encoding binary -blocking 0
set out [open file2 w]
fconfigure $out -translation binary -encoding binary -blocking 0
set check 1
set size 1024
while {$check} {
fcopy $in $out -command [list CopyMore $in $out $size] -size $size
}
proc CopyMore {in out size {error {}} } {
puts CallBack
if {[eof $in] || $error != "" } {set check 0; close $in}
}
vwait done
When I run it I get the following error: channel "file3" is busy
.
- Follow-Ups:
- References:
- serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- From: vitick
- Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- From: Bruce Hartweg
- Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- From: vitick
- Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- From: vitick
- Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- From: Alan Anderson
- Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- From: vitick
- Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- From: Alexandre Ferrieux
- Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- From: vitick
- Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- From: Darren New
- serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- Prev by Date: Re: Tcl Web Service with Authorization kills Tcl
- Next by Date: Re: Why I got "Runtime error" excecuting .exe file wrapped with TclAPP?
- Previous by thread: Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- Next by thread: Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- Index(es):
Relevant Pages
|