Can xterm attach use socket. io?
See original GitHub issue
import * as Terminal from 'xterm';
import * as attach from 'xterm/lib/addons/attach/attach';
Terminal.applyAddon(attach); // Apply the `attach` addon
var term = new Terminal();
var socket = new WebSocket('wss://docker.example.com/containers/mycontainerid/attach/ws');
term.attach(socket); // Attach the above socket to `term`
I don’t want to use websocket directly
Issue Analytics
- State:
- Created 5 years ago
- Comments:63 (28 by maintainers)
Top Results From Across the Web
powerumc/xterm-addon-attach-socketio - GitHub
xterm-addon-attach-socketio. It's used socket.io server and client without origin WebSocket. Installation. npm install xterm-addon-attach-socketio. Demo.
Read more >How to create web-based terminals - Sai Sandeep Vaddi
All we have to do now is, create a terminal with xterm and attach it to a container in dom. Then, pass input...
Read more >Stream interactive shell session with socket.io - Stack Overflow
io-client to connect to socket.io server. Starts interactive shell session using node-pty . const io = require('socket.io-client ...
Read more >Top 5 xterm-addon-attach Code Examples - Snyk
Learn more about how to use xterm-addon-attach, based on xterm-addon-attach code examples created from the most popular ways it is used in public...
Read more >billchurch/webssh2: Web SSH Client using ssh2, socket.io ...
Web SSH Client using ssh2, socket.io, xterm.js, and express. webssh webssh2. ... You will be prompted for credentials to use on the SSH...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@BengBu-YueZhang Possible, but you will have to provide your own attach functionality. Under the hood the terminal object has a
write
method, that needs to be glue’d to whatever output API you use. For the reverse case simply attach the ‘data’ event to your interface’s input sink. Both directions currently operate on JS strings. For more info see https://github.com/xtermjs/xterm.js/blob/master/src/addons/attach/attach.tsSweet, good luck with your project 😸