onTransportOpen = function onTransportOpen() {
                        if (failed) return;
                        transport.send([
                            {
                                type: "ping",
                                data: "probe",
                            },
                        ]);
                        transport.once("packet", function (msg) {
                            if (failed) return;

                            if ("pong" === msg.type && "probe" === msg.data) {
                                _this4.upgrading = true;

                                _this4.emitReserved("upgrading", transport);

                                if (!transport) return;
                                Socket.priorWebsocketSuccess = "websocket" === transport.name;

                                _this4.transport.pause(function () {
                                    if (failed) return;
                                    if ("closed" === _this4.readyState) return;
                                    cleanup();

                                    _this4.setTransport(transport);

                                    transport.send([
                                        {
                                            type: "upgrade",
                                        },
                                    ]);

                                    _this4.emitReserved("upgrade", transport);

                                    transport = null;
                                    _this4.upgrading = false;

                                    _this4.flush();
                                });
                            } else {
                                var err = new Error("probe error"); // @ts-ignore

                                err.transport = transport.name;

                                _this4.emitReserved("upgradeError", err);
                            }
                        });
                    }
Probes a transport.

@param {String} name - transport name
@private