       _this.onopen.call _this, e
     , false)
     @ws.addEventListener('message', (e) ->
-      _this.onmessage.call _this, e
+      _this.demuxMessage.call _this, e
     , false)
     @ws.addEventListener('error', (e) ->
       _this.onerror.call _this, e

      window.attachEvent 'onmessage', bounder
    # TODO: if Postmessage is not supported??

  # TODO : remove this!
  parseMessage: (msg) ->
    { data: msg.substring(5) }


    msg = event.data
    @log "Dispatching message: @{msg}"
    if msg.match("^data:")
      @demuxMessage @parseMessage msg
      @log "Calling onmessage callout"
    else if msg.match("^open:") && @onopen
      @onopen()
