Connect to terminal in raw mode

Able to use VIM
This commit is contained in:
wancat committed 2023-07-15 15:04:58 +08:00
1 parent 69ef435b77
commit e3d66709e4
2 files changed
+18 -11

No files matched your search

+2 -2
View File
@@ -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', () => {