1

请教一个 H5 和 PC 上的程序通讯的问题

 2 years ago
source link: https://www.v2ex.com/t/838119
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

V2EX  ›  JavaScript

请教一个 H5 和 PC 上的程序通讯的问题

  WindProtect · 11 小时 29 分钟前 · 679 次点击

需求是这样的,我们做了个 h5 程序跑手机浏览器上,然后需要在内网中的某台电脑运行一个打印程序来打印内容。

本来用的 http + websocket 直连 ip 来通讯,也运行良好。但是现在需要在这个 h5 程序加个扫码功能,这样那 h5 程序只能跑在 https 上,这样 websocket 也只能通过 ssl 来连接,使用 wss 的话又无法通过 ip 来直接请求。

各位有什么能让使用了 ssl 的 H5 程序直接和指定 PC 通讯的方案么?能双向通讯最好,实在不行单向也行。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK