87,993
社区成员
发帖
与我相关
我的任务
分享
term = new Terminal({
cols: 120,
rows: 24,
cursorBlink: 5,
scrollback: 100,
tabStopWidth: 4
});
term.open(document.getElementById('#term'));
term.fit();
conn = new WebSocket("ws://localhost:12345");
conn.onerror = function () { showErrorMessage('connect error.') };
conn.onmessage = function(event) {
term.write(event.data);
};
conn.onopen = function () { loginSshServer(); }
这个问题最后怎么解决的呀楼主
term.on('data', function($data) {
ws.send($data);
});
。我用的是Python,现在已经在paramiko库中找到相应的接口了。