src/connect/index.js
function receive ( str ){
    ping(); // clear/schedule next ping
    var msg = typeof str === 'string' ? JSON.parse( str ) : str;
    b9.emit('rtm.read', msg, replyTo( null ) );
    // acknowledge that a pending message was sent successfully
    if ( msg.reply_to ){
      delete pending[ msg.reply_to ];
    }
    else if ( msg.type != null ){
      b9.emit( msg.type, msg, replyTo( msg.channel ) );
    }
  }
function receive ( str ){
    ping(); // clear/schedule next ping
    var msg = typeof str === 'string' ? JSON.parse( str ) : str;
    b9.emit('rtm.read', msg, replyTo( null ) );
    // acknowledge that a pending message was sent successfully
    if ( msg.reply_to ){
      delete pending[ msg.reply_to ];
    }
    else if ( msg.type != null ){
      b9.emit( msg.type, msg, replyTo( msg.channel ) );
    }
  }
function receive ( str ) { ping ( ) ; // clear/schedule next ping var msg = typeof str === 'string' ? JSON . parse ( str ) : str ; b9 . emit ( 'rtm.read' , msg , replyTo ( null ) ) ; // acknowledge that a pending message was sent successfully if ( msg . reply_to ) { delete pending [ msg . reply_to ] ; } else if ( msg . type != null ) { b9 . emit ( msg . type , msg , replyTo ( msg . channel ) ) ; } }
handle a websocket message
@private method
handle a websocket message