title: Original 'this' context with Socket.IO
body: <p>I have wrapped (client-side) socket.io in a prototype class:</p>
  
  <pre><code>Chat.Client = Class.create();
  
  Chat.Client.prototype = {
  
      initialize: function() {
          ...
          this.socket.on('message', this.on_message);
          ...
      },
  
      on_message: function(data) {
          this.add_chat_message(data.something);
      }
  
      do_something: function(something) {
          ...
      }
  </code></pre>
  
  <p>This does not work because 'this' in on_message will be 'SocketNamespace'. Traditionally I would work around this by just passing 'this' into the callback as an additional parameter, but because I am using socket.io, I cannot simply do this.</p>
  
  <p>How can I solve this?</p>