Javascript网络服务器? [英] Javascript web server?

查看:76
本文介绍了Javascript网络服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Javascript中构建微观(概念验证)Web服务器?

Is it possible to build a micro (proof of concept) web server in Javascript?

有没有人在此之前完成此操作?

Has anyone done this before?.

编辑: 此处需要明确说明。问题最终是关于如何在浏览器的初始请求关闭后将数据从服务器推送到浏览器。换句话说,如何让浏览器接受服务器发起的后续请求。

是否需要安装基于javascript的Web服务器浏览器,还是有其他方法?

推荐答案

如果你说你想要能够为了将数据推送到已启动与服务器联系的浏览器,我会对Comet服务器进行一些研究。

If you're saying that you want to be able to push data to browsers that have initiated contact with your server, I'd do some research on Comet servers.

我对此一无所知,所以我'只是传递一些链接给你,希望能指出你正确的方向。

I don't know anything about it, so I'll just pass off a couple links to you that will hopefully point you in the right direction.

来自维基百科Comet_(编程)


Comet是一个Web应用程序模型,其中长期持有的HTTP请求允许Web服务器将数据推送到浏览器,而浏览器没有明确请求它。 1 Comet是一把伞嗯,包含实现这种互动的多种技术。所有这些方法都依赖于浏览器中默认包含的功能,例如JavaScript,而不是非默认插件。 Comet方法不同于网络的原始模型,其中浏览器一次请求一个完整的网页。[3]

Comet is a web application model in which a long-held HTTP request allows a web server to push data to a browser, without the browser explicitly requesting it.1 Comet is an umbrella term, encompassing multiple techniques for achieving this interaction. All these methods rely on features included by default in browsers, such as JavaScript, rather than on non-default plugins. The Comet approach differs from the original model of the web, in which a browser requests a complete web page at a time.[3]

这是一种叫做APE的东西。我对此一无所知,但您可能会觉得有用。

Here's something called APE. I don't know a thing about it, but you may find it helpful.

来自APE网站:


APE是专为Ajax Push设计的全功能OpenSource解决方案。它包括一个彗星服务器和一个Javascript框架。 APE允许实现任何类型的实时数据流到Web浏览器,而无需在客户端安装任何东西。

APE is a full-featured OpenSource solution designed for Ajax Push. It includes a comet server and a Javascript Framework. APE allows to implement any kind of real-time data streaming to a web browser, without having to install anything on the client-side.

这篇关于Javascript网络服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆