     return channel
 
   xhrHandshake: ->
+    console.log "bongo/xhrHandshake"
+    return @handshakeDone()
+
     @send 'xhrHandshake', (api) =>
       if @api
       then @handshakeDone()


  bindAutoreconnect: ->

    @mq.on 'disconnected', =>

      @mq.once 'connected', @bound 'reconnectHelper'


  disconnect:(shouldReconnect, callback)->
    # @channel.close().off()  if @channel?

    throw new Error "no broker client"  unless @mq?

    if 'function' is typeof shouldReconnect
      callback = shouldReconnect
      shouldReconnect = no

    return "already disconnected"  if @readyState is NOTCONNECTED or @readyState is DISCONNECTED

    @mq.once 'disconnected', callback.bind this  if callback?
    @mq.disconnect shouldReconnect


    @api = @createRemoteApiShims @apiDescriptor


    if @mq?
      console.log "bongo/constructor @api"
      @eventBus = new EventBus @mq
      @mq.on 'disconnected', =>
        console.log "bongo/disconnected @api"
        @disconnectedAt = Date.now()
        @emit 'disconnected'
        @readyState = DISCONNECTED
