-
hi,I'm investigating a device log display scenario that involves scrolling through the interface to view logs, download log files, enter commands, and so on. But this is an |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It depends on how you set up your electron client: JS in a browser context normally has no access to raw TCP sockets, it needs some sort of HTTP wrapping (either by Ajax/long polling or via websockets). Thats the reason why its often done with websockets. But with electron the situation changes - you can either use the electron client process as proxy to translate between TCP and the browser context (again forward data with websockets or with IPC), or allow the browser context to load nodejs modules and hook TCP handling in there directly (via the In the end this is more an electron question than xterm.js related. To get data into xterm.js you only have to feed it to |
Beta Was this translation helpful? Give feedback.
It depends on how you set up your electron client:
JS in a browser context normally has no access to raw TCP sockets, it needs some sort of HTTP wrapping (either by Ajax/long polling or via websockets). Thats the reason why its often done with websockets.
But with electron the situation changes - you can either use the electron client process as proxy to translate between TCP and the browser context (again forward data with websockets or with IPC), or allow the browser context to load nodejs modules and hook TCP handling in there directly (via the
net
module).In the end this is more an electron question than xterm.js related. To get data into xterm.js you only have to feed it to
term.write
…