| 54 | |
| 55 | ZeroWebsocket = (function() { |
| 56 | function ZeroWebsocket(url) { |
| 57 | this.onCloseWebsocket = bind(this.onCloseWebsocket, this); |
| 58 | this.onErrorWebsocket = bind(this.onErrorWebsocket, this); |
| 59 | this.onOpenWebsocket = bind(this.onOpenWebsocket, this); |
| 60 | this.log = bind(this.log, this); |
| 61 | this.response = bind(this.response, this); |
| 62 | this.route = bind(this.route, this); |
| 63 | this.onMessage = bind(this.onMessage, this); |
| 64 | this.url = url; |
| 65 | this.next_message_id = 1; |
| 66 | this.waiting_cb = {}; |
| 67 | this.init(); |
| 68 | } |
| 69 | |
| 70 | ZeroWebsocket.prototype.init = function() { |
| 71 | return this; |