简体   繁体   English

在网络浏览器中收听UDP或TCP

[英]Listen to UDP or TCP in a web browser

Is there any way to start a webserver in a browser ? 有什么方法可以在浏览器中启动Web服务器吗?

I need to be able to accept connections from c# running on another computer, I really don't care what technology I use as long as I can trigger javascript events on the "server" browser. 我需要能够接受来自另一台计算机上运行的c#的连接,我真的不在乎我使用什么技术,只要可以在“服务器”浏览器上触发javascript事件即可。

You can't start "real" webserver in a browser (ei there is no API and you are not allowed for security reasons to bind to and listen TCP port). 您无法在浏览器中启动“真实的”网络服务器(即没有API,并且出于安全原因,您不允许绑定并监听TCP端口)。 However, if you connect to a HTTP server wich acts as a "bus" and forwards messages to you then you in essence have the same functionality. 但是,如果您连接到充当“总线”的HTTP服务器并将消息转发给您,则您实质上具有相同的功能。 That's how browserver works. 这就是browserver的工作方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM