webtty: begin experimenting with JSON protocol.
This commit is contained in:
parent
02cc454ad1
commit
71d43603a9
2 changed files with 6 additions and 5 deletions
|
|
@ -182,7 +182,8 @@ function login(req, res, formdata) {
|
|||
var nsession = new TermSession(sessid, h, w);
|
||||
resheaders["Set-Cookie"] = "ID=" + sessid;
|
||||
res.writeHead(200, resheaders);
|
||||
res.write("l1\n" + sessid + "\n" + String(h) + "x" + String(w) + "\n");
|
||||
var logindict = {"login": true, "id": sessid, "w": w, "h": h};
|
||||
res.write(JSON.stringify(logindict));
|
||||
res.end();
|
||||
console.log("Started new session with key " + sessid + ", pid " + nsession.child.pid);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue