multitasking
[1/5] from: reboler:bol at: 9-Feb-2004 18:46
Hi Folks!,
is there anyway to 'read in paralell?
I mean to 'read three or more sites simultaneously.
a: read site1
b: read site2
but in paralell, not waiting for each line execution.
thanks in advance,
--DJ
[2/5] from: gchiu::compkarori::co::nz at: 9-Feb-2004 20:43
reboler wrote.. apparently on 10-Feb-2004/8:43:55+13:00
>Hi Folks!,
>but in paralell, not waiting for each line execution.
Check out Gabriele's async http protocol
http://www.rebol.it/giesse/async-protocol.r
--
Graham Chiu
http://www.compkarori.com/cerebrus
[3/5] from: warp:reboot:ch at: 10-Feb-2004 22:01
Hi all,
can someone please point me to some
example using async-protocol with /core
Thank you!
Will Arp
[warp--reboot--ch]
On 9-feb-04, at 20:48, Graham Chiu wrote:
[4/5] from: gchiu:compkarori at: 11-Feb-2004 1:16
Will Arp wrote.. apparently on 10-Feb-2004/22:01:11+1:00
>Hi all,
>
>can someone please point me to some
>example using async-protocol with /core
>
[
REBOL [
Title: "Test async protocol - HTTP download"
Author: "Gabriele Santilli"
]
do %async-protocol.r
handler: func [port [port!] state [word! error!] /local tmp cmd] [
if error? :state [print mold disarm state return true]
switch state [
connect [
; do HTTP request
insert port {GET /fg/anen.jpg HTTP/1.0^M^JHost: www.3dwallpaper.com^M^J^M^J}
false
]
read [false]
write [false]
close [
; get data
data: copy port
close port
;print copy/part data find data "^M^J^M^J"
data: to binary! find/tail data "^M^J^M^J"
other/image: attempt [load data]
other/text: ""
show other
false
]
]
]
port: open async://www.3dwallpaper.com:80
port/awake: :handler
view layout [
across me: box 100x100 random 255.255.255 0:00:00.5 feel [
engage: func [f a e] [
if a = 'time [
me/color: random 255.255.255
show me
]
]
]
other: box 100x100 255.255.255 "Downloading image..." Return
Area 208x100 "You can type here while downloading."
]
]
--
Graham Chiu
http://www.compkarori.com/cerebrus
[5/5] from: warp:reboot:ch at: 11-Feb-2004 0:13
Thanks Graham,
I'll try to do something with this in /core.
Like you said in /View 1.3 dev. having a XP
interface as default will really not please OS X
users!
Have a nice day.
Will
[warp--reboot--ch]