最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Websockets and telnet connection - Stack Overflow

programmeradmin1浏览0评论

Does anyone know if it is possible to use HTML-WebSockets to listen to a telnet stream?

Description: I have a DSL-Phone-Router (Fritzbox) which has a "Callmonitor"-function. This sends for every ining/outgoing call a telnet line with specific info.

I can see this stream, when I run...

telnet fritz.box 1012

on my Windows-CMD or MAC-Terminal.

My Question: Is it possible that HTML5-Websockets can listen to this stream? Or can HTML5-Websockets only listen to a Websockets-Server like node.js etc...?

Does anyone know if it is possible to use HTML-WebSockets to listen to a telnet stream?

Description: I have a DSL-Phone-Router (Fritzbox) which has a "Callmonitor"-function. This sends for every ining/outgoing call a telnet line with specific info.

I can see this stream, when I run...

telnet fritz.box 1012

on my Windows-CMD or MAC-Terminal.

My Question: Is it possible that HTML5-Websockets can listen to this stream? Or can HTML5-Websockets only listen to a Websockets-Server like node.js etc...?

Share Improve this question edited Dec 10, 2023 at 13:05 hippietrail 17k21 gold badges109 silver badges179 bronze badges asked Dec 28, 2013 at 2:41 AppGeerAppGeer 7451 gold badge13 silver badges28 bronze badges 1
  • Yeah, websockets itself even has its own protocol (ws:) and needs to be connected to a server that understands it. However, you might be able to get the server to monitor the telnet, and send the stream over a websockets connection. – Hylianpuffball Commented Dec 28, 2013 at 2:47
Add a ment  | 

1 Answer 1

Reset to default 4

The websockify project was created for exactly this sort of thing. It is a python program that bridges between the WebSocket clients and raw TCP servers. You will need somewhere to run websockify, but the websockify requirements are fairly minimal. 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. Disclaimer: I created websockify.

发布评论

评论列表(0)

  1. 暂无评论