Rebol Multitasking with Async: why do I get Invalid port spec

爷,独闯天下 提交于 2019-12-06 18:48:32

This from Gabriele, the author of the async-protocol showing async http fetching his home page.

>> do http://www.colellachiara.com/soft/libs/async-protocol.r
connecting to: www.colellachiara.com
Script: "async:// protocol (Asynchronous TCP)" (8-Feb-2005)
async protocol loaded
asyncs protocol loaded
>> do http://www.colellachiara.com/soft/libs/async-http.r
connecting to: www.colellachiara.com
Script: "Asynchronous HTTP protocol for REBOL" (8-Feb-2004)
ahttp protocol loaded
ahttps protocol loaded
>> p: open ahttp://www.rebol.com/
>> p/awake: func [port [port!] event [error! word!]] [if event = 'close [print copy port return true] false]
>> wait []
<!doctype html>
<html><head>
<meta name="generator" content="REBOL WIP Wiki"/>
<meta name="date" content="7-Jun-2010/15:05:53-7:00"/>
<meta name="rebol-version" content="2.100.97.4.2"/>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<meta http-equiv="Pragma" content="no-cache" />

Use Romano's protocol and see if that works for you as it does for me.

http://www.rebol.it/romano/atcp-protocol.r

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!