mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
Connect to terminal in raw mode
Able to use VIM
This commit is contained in:
1 parent
69ef435b77
commit
e3d66709e4
2 files changed
+18
-11
No files matched your search
+2
-2
@@ -13,12 +13,12 @@ io.on('connection', async (socket) => {
|
||||
const stream = await attachContainer(container)
|
||||
|
||||
stream.on('data', (chunk) => {
|
||||
socket.send(chunk.toString())
|
||||
socket.send(chunk)
|
||||
})
|
||||
|
||||
socket.on('message', function incoming(message) {
|
||||
console.log(`From client: ${message}`)
|
||||
stream.write(message + '\n')
|
||||
stream.write(message)
|
||||
})
|
||||
|
||||
socket.on('close', () => {
|
||||
|
||||
Reference in new issue
Block a user