SocketClient.prototype.connect = function()

in TestChatServer/static/proxy.js [16:26]


SocketClient.prototype.connect = function () {
  var self = this;

  this.list_elem.innerHTML = '';
  this.info_div.innerHTML = 'status: connecting...'; 
  this.socket = new WebSocket("ws://" + document.location.host + "/chat");  
  
  this.socket.onopen = function () {self.onopen.apply(self, arguments);};
  this.socket.onmessage = function () {self.onmessage.apply(self, arguments);};
  this.socket.onclose = function () {self.onclose.apply(self, arguments);};
};