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 14:12:21 -0700 (PDT)
Thanks everyone for your replies. It is very enlightening.
I read the manual for fcopy and duplicated the second example exactly
as it is on the page and it worked.
I was trying to run my previous code like this (simplified}:
set check 1
while {$check} {
fcopy $in $out -command [list CopyMore $in $out] -size 1024
}
proc CopyMore {in out args} {
if {[eof $in]} {set check 0; close $in}
}
I thought that it worked the way "read" command works, by reading from
where it left of but instead I was getting a "file busy" error.
I am still not sure why my code did not work.
I was able to simulate fcopy with TCL commands by using variable
trace. And it was a very good exercise. :)
.
- 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
- serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- Prev by Date: You can find documents at here
- Next by Date: Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- 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
|