Simplify structure of command messages

The first byte of a input message shows the type of that message.
0: normal keystrokes
1: resize window command
This commit is contained in:
Iwasaki Yudai 2015-08-21 13:40:39 +09:00
parent ce96943af2
commit 5eea5067db
3 changed files with 35 additions and 53 deletions

View file

@ -24,11 +24,8 @@
ws.send(
"1" + JSON.stringify(
{
name: "resize_terminal",
arguments: {
columns: columns,
rows: rows,
},
columns: columns,
rows: rows,
}
)
)