Rebol READ 自己如何实现异步可插拔协议
本文展示了如何在rebol中实现可以通过firefox或者ie或者命令行读取的异步可插协议 http://www.devx.com/webdev/Article/17120/0/page/1
因此,例如,如果我定义 reb:// 协议,我可以在浏览器中输入它,然后它将执行 rebol 中的处理程序。
但是 rebol 本身在读取时如何解释相同的 reb:// :
read reb://blahblahblah
This article shows how to implement asynchronous pluggable protocol in rebol that can be read by firefox or ie or command line http://www.devx.com/webdev/Article/17120/0/page/1
So for example if I define the reb:// protocol I could type it in browser and It will execute the handler in rebol.
But how can rebol itself interpret this same reb:// when doing a read:
read reb://blahblahblah
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须构建一个协议处理程序并将其作为一种方案嵌入到 rebol 系统中,该方案将 reb:// 转换为可以与端口对象交互的内容。
网上有一些 rebol 方案教程。
如果您想要修改它们,您可以直接查看方案处理程序。过去经常需要这样做来修复 ftp 等老化协议。 (有时专门针对单个服务器软件)。
例如
探针系统/方案/whois
这可能是关于该主题的最古老但最好的文章。这严格来说是 R2。 http://www.rebolforces.com/articles/protocols/
you have to build a protocol handler and embed it within the rebol system as a scheme which converts reb:// to something that can interact with a port object.
there are a few rebol scheme tutorials on the net.
you can look at the scheme handlers directly if you want in order to modify them. this has often been required in the past to fix aging protocols like ftp. (sometimes specifically for a single server software).
for example
probe system/schemes/whois
this is probably the oldest but the best article on the subject. this is strictly R2. http://www.rebolforces.com/articles/protocols/