Changeset 317
- Timestamp:
- 06/26/08 18:27:17 (3 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/0.5/daemon/orbited/static/protocols/stomp/stomp.js
r316 r317 81 81 break 82 82 default: 83 throw("Unknown STOMP frame type " + frame[0])83 throw("Unknown STOMP frame type " + msg.type) 84 84 } 85 85 … … 92 92 var frame = "" 93 93 frame += type + "\n" 94 console.log("A: " + frame)95 94 for (var key in headers) 96 95 frame += key + ": " + headers[key] + "\n" 97 console.log("B: " + frame)98 96 frame += "\n" // end of headers 99 97 if (body) 100 98 frame += body 101 99 frame += "\0" // frame delineator 102 console.log(JSON.stringify([type,headers,body]))103 console.log(frame)104 100 var data = UTF8ToBytes(frame) 105 101 conn.send(UTF8ToBytes(frame)) … … 114 110 self.user = user 115 111 var onsockopen = function() { 116 send_frame("CONNECT", [["login", user]])112 send_frame("CONNECT", {"login": user}) 117 113 } 118 114 conn = new BinaryTCPSocket(domain, port)