简体   繁体   English

Websocket和telnet连接

[英]Websockets and telnet connection

Does anyone know if it is possible to use HTML-WebSockets to listen to a telnet stream? 有谁知道是否可以使用HTML-WebSockets监听telnet流?

Description: I have a DSL-Phone-Router (Fritzbox) which has a "Callmonitor"-function. 描述:我有一个具有“ Callmonitor”功能的DSL电话路由器(Fritzbox)。 This sends for every incomming/outgoing call a telnet line with specific infos. 这将为每个来电/去电发送带有特定信息的telnet线路。

I can see this stream, when i run... 我跑步时可以看到此信息流...

telnet fritz.box 1012

on my Windows-CMD or MAC-Terminal. 在我的Windows-CMD或MAC终端上。

My Question: Is it possible, that HTML5-Websockets can listen to this stream? 我的问题:HTML5-Websockets是否可以收听此流? Or can HTML5-Websockets only listen to a Websockets-Server like node.js etc...? 还是HTML5-Websockets只能监听像node.js等的Websockets服务器?

The websockify project was created for exactly this sort of thing. websockify项目就是为这种事情而创建的。 It is a python program that bridges between the WebSocket clients and raw TCP servers. 这是一个在WebSocket客户端和原始TCP服务器之间架桥的python程序。 You will need somewhere to run websockify, but the websockify requirements are fairly minimal. 您将需要在某个地方运行websockify,但是websockify的要求非常低。 Also, you will need to implement the client side (HTML/Javascript) to display the stream, but websockify includes a wstelnet.html example that you should be able to modify or use directly for that purpose. 另外,您将需要实现客户端(HTML / Javascript)来显示流,但是websockify包含一个wstelnet.html示例,您应该可以对其进行修改或直接将其用于此目的。 Disclaimer : I created websockify. 免责声明 :我创建了websockify。

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

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