callback = function callback(packet) {
                        // if its the first message we consider the transport open
                        if ("opening" === _this3.readyState && packet.type === "open") {
                            _this3.onOpen();
                        } // if its a close packet, we close the ongoing requests

                        if ("close" === packet.type) {
                            _this3.onClose({
                                description: "transport closed by the server",
                            });

                            return false;
                        } // otherwise bypass onData and handle the message

                        _this3.onPacket(packet);
                    }
Overloads onData to detect payloads.

@protected