Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- From: Alan Anderson <aranders@xxxxxxxxxxxxx>
- Date: Sat, 29 Mar 2008 01:21:00 -0400
In article
<7a3ef3f4-8af1-4078-a75d-b0fbf16add80@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
vitick@xxxxxxxxx wrote:
How do you write a file to socket copy procedure that notifies me
about it's progress
every so many bytes and does not block while doing so.
Start with the [fcopy] manual page, and look at how the second example
works. The -command option along with a -size value does exactly what
you are asking. You can modify the CopyMore procedure to do additional
actions, such as setting the value of a progress bar widget.
How about if I
want to control how fast
the copy progresses without blocking other events?
Change CopyMore to do smaller or larger chunks based on a control
widget's value, and/or to introduce a delay before rescheduling itself
to call the [fcopy] again.
.
- 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
- serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- Prev by Date: Re: Autoexpect under Windows (and later Mac and Linux)
- Next by Date: Re: Tcl/Tk 8.5.2 Release Candidates
- 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
|