temp/www/build/bundle.js
/**
         * Overloads onData to detect payloads.
         *
         * @api private
         */
Overloads onData to detect payloads.
@api private
Overloads onData to detect payloads . @api private
onData(data) {
            const callback = packet => {
                if ("opening" === this.readyState && packet.type === "open") {
                    this.onOpen();
                }
                if ("close" === packet.type) {
                    this.onClose();
                    return false;
                }
                this.onPacket(packet);
            };
            decodePayload(data, this.socket.binaryType).forEach(callback);
            if ("closed" !== this.readyState) {
                this.polling = false;
                this.emit("pollComplete");
                if ("open" === this.readyState) {
                    this.poll();
                }
            }
        }
onData ( data ) { const callback = packet => { if ( "opening" === this . readyState && packet . type === "open" ) { this . onOpen ( ) ; } if ( "close" === packet . type ) { this . onClose ( ) ; return false ; } this . onPacket ( packet ) ; } ; decodePayload ( data , this . socket . binaryType ) . forEach ( callback ) ; if ( "closed" !== this . readyState ) { this . polling = false ; this . emit ( "pollComplete" ) ; if ( "open" === this . readyState ) { this . poll ( ) ; } } }
Overloads onData to detect payloads.
Overloads onData to detect payloads .
// if its the first message we consider the transport open // if its a close packet, we close the ongoing requests // otherwise bypass onData and handle the message // decode payload // if an event did not trigger closing // if we got data we're not polling