* @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol
(response)
| 63869 | this[kBinaryType] = "blob"; |
| 63870 | } else { |
| 63871 | this[kBinaryType] = type2; |
| 63872 | } |
| 63873 | } |
| 63874 | /** |
| 63875 | * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol |
| 63876 | */ |
| 63877 | #onConnectionEstablished(response) { |
| 63878 | this[kResponse] = response; |
| 63879 | const parser = new ByteParser(this); |
| 63880 | parser.on("drain", function onParserDrain() { |
| 63881 | this.ws[kResponse].socket.resume(); |
| 63882 | }); |
| 63883 | response.socket.ws = this; |
| 63884 | this[kByteParser] = parser; |
| 63885 | this[kReadyState] = states.OPEN; |
| 63886 | const extensions = response.headersList.get("sec-websocket-extensions"); |
| 63887 | if (extensions !== null) { |
| 63888 | this.#extensions = extensions; |
| 63889 | } |
| 63890 | const protocol = response.headersList.get("sec-websocket-protocol"); |
| 63891 | if (protocol !== null) { |
| 63892 | this.#protocol = protocol; |
no test coverage detected