Scott, I think you are a bit negative about transfer rates. :)
Surely there is a way.

Here also, is an easier way to save the scheme:

        write clipboard:// join {rebol [] system/schemes/http:} mold
system/schemes/http

Now open your favourite editor, paste into a new file and save.

Uh oh, now I'm into it...

Search for "read:".  You have found the read function.
Now add a line after the "net-utils/net-log" line:

        print join "bytes: " [port/state/num " at " now/time/precise]

Save the file and do it. Then test the change:

>> read http://www.rebol.com/
connecting to: www.rebol.com
bytes: 2048 at 17:39:47.731
bytes: 2048 at 17:39:47.741
bytes: 2048 at 17:39:47.741
bytes: 2048 at 17:39:48.332
bytes: 2048 at 17:39:48.332
bytes: 2048 at 17:39:48.332
bytes: 2048 at 17:39:48.552
== {<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">
<META NAME="keywords" CONTENT="REBOL, pro...

With that info it's possible to make up some progress callback so you
can make a display showing transfer rate.
You would need to add a couple of variables to the http object, eg:
        total-bytes
        last-transfer-time
and reset these at the appropriate time.

Mmm.. while I'm here I can see the /custom refinement.
If I ever forget the custom refinement dialect I can
look here in the source.

Anton.

> From: Maxim Olivier-Adlhoch
> ...
> I was wondering, if its possible to put a hook somewhere (even if
> deep) within
> the port or more specifically the html port handler, so that we can update
> something elsewhere, do statistics or print out transfer rate for
> example...
> ...
>
>
> Hi, Max,
>
> Since no one has offered anything any more specific, I can
> suggest a general way to put in your own hooks, but some of the
> services are at a lower level than you can access through the
> standard service.
>
> First, you'll need a working copy of the scheme.  For example, for http:
>
> echo %/path/to/my-http.txt
> probe system/schemes/http
> echo off

> It may be enough to get you going, but I would not be
> overenthusiastic about thinking you will be able the scrounge
> things like transfer rates!
>
> Hope this gives you some help.
>
> --Scott Jones

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to