首頁







玄幻奇幻 都市言情 武俠仙俠 軍事歷史 網游競技 科幻靈異 二次元 收藏夾
  • 放肆文學 » 軍事歷史 » 神話版三國» 第九百一十七章 辛憲英
  • 熱門作品 | 最新上架 | 全本小說 | 閱讀紀錄

    神話版三國 - 第九百一十七章 辛憲英字體大小: A+
     
    , this._onClose = function() { t.onClose({ code: 4, reason: "connection closed" }) } } close() { this._transport.close(), null !== this._onClose && this._onClose() } send(e, t, n) { const i = { session: t, node: n, data: e } , r = { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(i), mode: "cors", credentials: "same-origin" }; (0, this.options.fetch)(this.options.emulationEndpoint, r) } } class WebtransportTransport { constructor(e, t) { this.endpoint = e, this.options = t, this._transport = null, this._stream = null, this._writer = null, this._utf8decoder = new TextDecoder, this._protocol = "json" } name() { return "webtransport" } subName() { return "webtransport" } emulation() { return !1 } supported() { return void 0 !== this.options.webtransport && null !== this.options.webtransport } initialize(e, t) { return __awaiter(this, void 0, void 0, (function*() { let n; n = globalThis && globalThis.document && globalThis.document.baseURI ? new URL(this.endpoint,globalThis.document.baseURI) : new URL(this.endpoint), "protobuf" === e && n.searchParams.append("cf_protocol", "protobuf"), this._protocol = e; const i = new EventTarget; this._transport = new this.options.webtransport(n.toString()), this._transport.closed.then(( () => { t.onClose({ code: 4, reason: "connection closed" }) } )).catch(( () => { t.onClose({ code: 4, reason: "connection closed" }) } )); try { yield this._transport.ready } catch (e) { return void this.close() } let r; try { r = yield this._transport.createBidirectionalStream() } catch (e) { return void this.close() } this._stream = r, this._writer = this._stream.writable.getWriter(), i.addEventListener("close", ( () => { t.onClose({ code: 4, reason: "connection closed" }) } )), i.addEventListener("message", (e => { t.onMessage(e.data) } )), this._startReading(i), t.onOpen() } )) } _startReading(e) { return __awaiter(this, void 0, void 0, (function*() { const t = this._stream.readable.getReader(); let n = "" , i = 0 , r = new Uint8Array; try { for (; ; ) { const {done: s, value: o} = yield t.read(); if (o.length > 0) if ("json" === this._protocol) for (n += this._utf8decoder.decode(o); i < n.length; ) if ("\n" === n[i]) { const t = n.substring(0, i); e.dispatchEvent(new MessageEvent("message",{ data: t })), n = n.substring(i + 1), i = 0 } else ++i; else { const t = new Uint8Array(r.length + o.length); for (t.set(r), t.set(o, r.length), r = t; ; ) { const t = this.options.decoder.decodeReply(r); if (!t.ok) break; { const n = r.slice(0, t.pos); e.dispatchEvent(new MessageEvent("message",{ data: n })), r = r.slice(t.pos) } } } if (s) break } } catch (t) { e.dispatchEvent(new Event("close")) } } )) } close() { return __awaiter(this, void 0, void 0, (function*() {


    上一頁 ←    → 下一頁

    三界紅包群寒門狀元西遊大妖王最強妖孽三國之召喚猛將
    會穿越的流浪星球唐朝好地主明天下我的大小美女花爆萌小仙:撲倒冰山冷上