Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

WebSocket

From Wikipedia, the free encyclopedia
Computer network protocol
WebSocket
A diagram describing a connection using WebSocket
International standardRFC 6455
Developed byIETF
IndustryComputer science
Connector typeTCP
Websitehttps://websockets.spec.whatwg.org/

WebSocket is a computercommunications protocol, providing asimultaneous two-way communication channel over a singleTransmission Control Protocol (TCP) connection. The WebSocket protocol was standardized by theIETF asRFC 6455 in 2011. The current specification allowing web applications to use this protocol is known asWebSockets.[1] It is a living standard maintained by theWHATWG and a successor toThe WebSocket API from theW3C.[2]

WebSocket is distinct fromHTTP used to serve most webpages. Although they are different,RFC 6455 states that WebSocket "is designed to work over HTTP ports 443 and 80 as well as to support HTTP proxies and intermediaries", thus making it compatible with HTTP. To achieve compatibility, the WebSockethandshake uses theHTTP Upgrade header[3] to change from the HTTP protocol to the WebSocket protocol.

The WebSocket protocol enablesfull-duplex interaction between aweb browser (or otherclient application) and aweb server with lower overhead than half-duplex alternatives such as HTTPpolling, facilitating real-time data transfer from and to the server. This is made possible by providing a standardized way for the server to send content to the client without being first requested by the client, and allowing messages to be passed back and forth while keeping the connection open. In this way, a two-way ongoing conversation can take place between the client and the server. The communications are usually done over TCPport number 443 (or 80 in the case of unsecured connections), which is beneficial for environments that block non-web Internet connections using afirewall. Additionally, WebSocket enables streams of messages on top of TCP. TCP alone deals with streams of bytes with no inherent concept of a message. Similar two-way browser–server communications have been achieved in non-standardized ways using stopgap technologies such asComet orAdobe Flash Player.[4]

Most browsers support the protocol, includingGoogle Chrome,Firefox,Microsoft Edge,Internet Explorer,Safari andOpera.[5]

The WebSocket protocol specification definesws (WebSocket) andwss (WebSocket Secure) as two newuniform resource identifier (URI) schemes[6] that are used for unencrypted and encrypted connections respectively. Apart from the scheme name andfragment (i.e.# is not supported), the rest of the URI components are defined to useURI generic syntax.[7]

History

[edit]

WebSocket was first referenced as TCPConnection in theHTML5 specification, as a placeholder for a TCP-based socket API.[8] In June 2008, a series of discussions were led byMichael Carter that resulted in the first version of the protocol known as WebSocket.[9]Before WebSocket, port 80 full-duplex communication was attainable usingComet channels; however, Comet implementation is nontrivial, and due to the TCP handshake and HTTP header overhead, it is inefficient for small messages. The WebSocket protocol aims to solve these problems without compromising the security assumptions of the web.The name "WebSocket" was coined byIan Hickson and Michael Carter shortly thereafter through collaboration on the #whatwg IRC chat room,[10] and subsequently authored for inclusion in the HTML5 specification by Ian Hickson. In December 2009, Google Chrome 4 was the first browser to ship full support for the standard, with WebSocket enabled by default.[11] Development of the WebSocket protocol was subsequently moved from the W3C andWHATWG group to the IETF in February 2010, and authored for two revisions under Ian Hickson.[12]

After the protocol was shipped and enabled by default in multiple browsers, theRFC 6455 was finalized under Ian Fette in December 2011.

RFC 7692 introduced compression extension to WebSocket using theDEFLATE algorithm on a per-message basis.

Client example

[edit]
<!DOCTYPE html><script>// Connect to serverws=newWebSocket("ws://127.0.0.1/scoreboard")// Local server// ws = new WebSocket("wss://game.example.com/scoreboard") // Remote serverws.onopen=()=>{console.log("Connection opened")ws.send("Hi server, please send me the score of yesterday's game")}ws.onmessage=(event)=>{console.log("Data received",event.data)ws.close()// We got the score so we don't need the connection anymore}ws.onclose=(event)=>{console.log("Connection closed",event.code,event.reason,event.wasClean)}ws.onerror=()=>{console.log("Connection closed due to error")}</script>

Server example

[edit]
fromsocketimportsocketfrombase64importb64encodefromhashlibimportsha1MAGIC=b"258EAFA5-E914-47DA-95CA-C5AB0DC85B11"# Create socket and listen at port 80ws=socket()ws.bind(("",80))ws.listen()conn,addr=ws.accept()# Parse requestforlineinconn.recv(4096).split(b"\r\n"):ifline.startswith(b"Sec-WebSocket-Key"):nonce=line.split(b":")[1].strip()# Format responseresponse=f"""\HTTP/1.1 101 Switching ProtocolsUpgrade: websocketConnection: UpgradeSec-WebSocket-Accept:{b64encode(sha1(nonce+MAGIC).digest()).decode()}"""conn.send(response.replace("\n","\r\n").encode())whileTrue:# decode messages from the clientheader=conn.recv(2)FIN=bool(header[0]&0x80)# bit 0assertFIN==1,"We only support unfragmented messages"opcode=header[0]&0xf# bits 4-7assertopcode==1oropcode==2,"We only support data messages"masked=bool(header[1]&0x80)# bit 8assertmasked,"The client must mask all frames"payload_size=header[1]&0x7f# bits 9-15assertpayload_size<=125,"We only support small messages"masking_key=conn.recv(4)payload=bytearray(conn.recv(payload_size))foriinrange(payload_size):payload[i]=payload[i]^masking_key[i%4]print(payload)

Web API

[edit]

A web application (e.g. web browser) may use theWebSocket interface to connect to a WebSocket server.

WebSocket web API specification
TypeName[13]Description
Constructorws = newWebSocket(url [, protocols ])Startopening handshake with a WebSocket server.[14]
  • url: A string containing:
    • Scheme: must bews,wss,http orhttps.
    • Server hostname.
    • Optional server port: If not specified, 80 is used for ws/http and 443 for wss/https.
    • Optional path.
    • No fragment. There must not be any fragment, otherwiseSyntaxError is thrown.
  • Optionalprotocols: A string or an array of strings used as the value for theSec-WebSocket-Protocol header.
Methodws.send(data)Send data.data must bestring,Blob,ArrayBuffer orArrayBufferView. ThrowInvalidStateError ifws.readyState isWebSocket.CONNECTING.
ws.close([ code ] [, reason ])Startclosing handshake.[15]
  • Optionalcode: If specified, must be 1000 (normal closure) or in the range 3000 to 4999 (application-defined), otherwiseInvalidAccessError is thrown. If not specified, 1000 is used.
  • Optionalreason: If specified, must be a string not longer than 123 bytes (UTF-8), otherwiseSyntaxError is thrown. If not specified, an empty string is used.
Eventws.onopen = (event) => {}

ws.addEventListener("open", (event) => {})

Opening handshake succeeded.event type isEvent.
ws.onmessage = (event) => {}

ws.addEventListener("message", (event) => {})

Data received.event type isMessageEvent.event.data contains the data received, of type:[16]
  • String for text.
  • Blob orArrayBuffer for binary (seews.binaryType).
ws.onclose = (event) => {}

ws.addEventListener("close", (event) => {})

The underlyingTCP connection closed.event type isCloseEvent containing:[17][18][19][20]
  • event.code:status code (integer).
  • event.reason: reason for closing (string).
  • event.wasClean:true if the TCP connection was closed after the closing handshake was completed;false otherwise.

Note:

  • If the received Close frame contains apayload: the payload data containsevent.code andevent.reason.
  • If the received Close frame containsno payload:event.code is 1005 (no code received) andevent.reason is an empty string.
  • Ifno Close frame was received:event.code is 1006 (connection closed abnormally) andevent.reason is an empty string.
ws.onerror = (event) => {}

ws.addEventListener("error", (event) => {})

Connection closed due to error.event type isEvent.
Attributews.binaryTypeA string indicating the type ofevent.data inws.onmessage when binary data is received. Initially set to"blob" (Blob object). May be changed to"arraybuffer" (ArrayBuffer object).
Read-only attributews.urlThe URL given to the WebSocket constructor.
ws.bufferedAmountThe number of bytes waiting to be transmitted.
ws.protocolThe protocol accepted by the server, or an empty string if the client did not specifyprotocols in theWebSocket constructor.
ws.extensionsThe extensions accepted by the server.
ws.readyStateThe connection state. It is one of the constants below.
ConstantWebSocket.CONNECTING = 0Waiting opening handshake.[21][22]
WebSocket.OPEN = 1Opening handshake succeeded. The client and server may message each other.[23][24]
WebSocket.CLOSING = 2Waitingclosing handshake. Eitherws.close() was called or the server sent a Close frame.[25][26]
WebSocket.CLOSED = 3The underlyingTCP connection is closed.[27][17][18]

Protocol

[edit]

Steps:

  1. Opening handshake (HTTP request +HTTP response) to establish a connection.
  2. Data messages to transfer application data.
  3. Closing handshake (two Close frames) to close the connection.

Opening handshake

[edit]

The client sends anHTTP request (methodGET,version ≥ 1.1) and the server returns anHTTP response withstatus code 101 (Switching Protocols) on success. This means a WebSocket server can use the same port as HTTP (80) and HTTPS (443) because the handshake is compatible with HTTP.[28]

HTTP headers
Side
HeaderValueMandatory
Request
OriginVariesYes (for browser clients)[29]
HostVariesYes
Sec-WebSocket-Version13[30]
Sec-WebSocket-Keybase64-encode(16-byte randomnonce)[31]
Response
Sec-WebSocket-Acceptbase64-encode(sha1(Sec-WebSocket-Key +"258EAFA5-E914-47DA-95CA-C5AB0DC85B11"))[32]
Both
ConnectionUpgrade[33][34]
Upgradewebsocket[35][36]
Sec-WebSocket-ProtocolThe request may contain acomma-separated list of strings (ordered by preference) indicatingapplication-level protocols (built on top of WebSocket data messages) the client wishes to use.[37] If the client sends this header, the server response must be one of the values from the list.Optional
Sec-WebSocket-Extensions
Other headersVaries

Example request:[38]

GET/chatHTTP/1.1Host:server.example.comUpgrade:websocketConnection:UpgradeSec-WebSocket-Key:x3JJHMbDL1EzLkh9GBhXDw==Sec-WebSocket-Protocol:chat, superchatSec-WebSocket-Version:13Origin:http://example.com

Example response:

HTTP/1.1101Switching ProtocolsUpgrade:websocketConnection:UpgradeSec-WebSocket-Accept:HSmrc0sMlYUkAGmm5OPpG2HaGWk=Sec-WebSocket-Protocol:chat

In HTTP each line ends in\r\n and the last line is empty.

# Calculate Sec-WebSocket-Accept using Sec-WebSocket-Keyfrombase64importb64encodefromhashlibimportsha1fromosimporturandom# key = b64encode(urandom(16)) # Client should do thiskey=b"x3JJHMbDL1EzLkh9GBhXDw=="# Value in example request abovemagic=b"258EAFA5-E914-47DA-95CA-C5AB0DC85B11"# Protocol constantprint(b64encode(sha1(key+magic).digest()))# Output: HSmrc0sMlYUkAGmm5OPpG2HaGWk=

Once the connection is established, communication switches to a binary frame-based protocol which does not conform to the HTTP protocol.

Sec-WebSocket-Key andSec-WebSocket-Accept are intended to prevent acachingproxy from re-sending a previous WebSocket conversation,[39] and does not provide any authentication, privacy, or integrity.

Though some servers accept a shortSec-WebSocket-Key, many modern servers will reject the request with error "invalid Sec-WebSocket-Key header".

Frame-based message

[edit]

After the opening handshake, the client and server can, at any time, send messages to each other, such asdata messages (text or binary) andcontrol messages (close, ping, pong). A message is composed of one or more frames.

Fragmentation allows a message to be split into two or more frames. It enables sending messages with initial data available but complete length unknown. Without fragmentation, the whole message must be sent in one frame, so the complete length is needed before the first byte can be sent, which requires a buffer.[40] It also enables multiplexing several streams simultaneously (e.g. to avoid monopolizing a socket for a single largepayload).[41]

  • Anunfragmented message consists of a single frame withFIN = 1 andopcode ≠ 0.
  • Afragmented message consists of a single frame withFIN = 0 andopcode ≠ 0, followed by zero or more frames withFIN = 0 andopcode = 0, and terminated by a single frame withFIN = 1 andopcode = 0.

Frame structure

[edit]
Index
(in bits)
FieldSize
(in bits)
Description
0FIN[42]1
  • 1 = final frame of a message.
  • 0 = message is fragmented and this is not the final frame.
1RSV11Must be 0 unless defined by an extension.[43]
2RSV21
3RSV31
4Opcode4Seeopcodes below.
8Masked[44]1
  • 1 = frame is masked and masking key is present.
  • 0 = frame is not masked and masking key is not present.
Seeclient-to-server masking below.
9Payload length[45]7, 7+16 or 7+64Length of the payload (extension data + application data) in bytes.
  • 0–125 = This is the payload length.
  • 126 = The following 16 bits are the payload length.
  • 127 = The following 64 bits (MSB must be 0) are the payload length.
Endianness is big-endian.Signedness is unsigned. The minimum number of bits must be used to encode the length.
VariesMasking key0 or 32Aclient must mask all frames sent to the server. Aserver must not mask any frames sent to the client.[46]Frame masking appliesXOR between the masking key (a four-byte random nonce) and the payload data. The following algorithm is used to mask/unmask a frame:[47]
for i = 0 to payload_length - 1    payload[i] = payload[i] xor masking_key[i modulo 4]
PayloadExtension dataPayload length (in bytes)Must be empty unless defined by an extension.
Application dataDepends on the opcode.

Opcodes

[edit]
Frame typeOpcodeRelated

Web API

DescriptionPurpose
Fragmentable
Max. payload length
Continuation0Identifies an intermediate frame of a fragmented message.2631{\displaystyle 2^{63}-1} bytes
Data frameText1send(),onmessageUTF-8 encoded application text.Application dataYes
Binary2Application binary data.
3–7Reserved
Control frameClose8close(),oncloseA Close frame is sent tostartthe closing handshake which may prevent data loss by complementing theTCP closing handshake.[48] No frame can be sent after a Close frame. If a Close frame is received and no prior Close frame was sent, a response Close frame with the same payload must be sent. The payload is optional, but if present, it must start with a two-byte big-endian unsigned integerreason code, optionally followed by a UTF-8 encoded reason message not longer than 123 bytes.[49]Protocol stateNo125 bytes[50]
Ping9May be used forlatency measurement,keepalive andheartbeat. Both sides can initiate a ping (with any payload). Whoever receives it must immediately send back a pong with the same payload. A pong should be ignored if no prior ping was sent.[51][52]
Pong10
11–15Reserved

Status codes

[edit]
Range[53]Allowed in Close frameCode

[54]

Description
0–999NoUnused
1000–2999 (Protocol)Yes1000Normal closure.
1001Going away (e.g. browser tab closed).
1002Protocol error.
1003Unsupported data (e.g. endpoint only understands text but received binary).
No1004Reserved for future usage
1005No code received.
1006Connection closed abnormally (closing handshake did not occur).
Yes1007Invalid payload data (e.g. non UTF-8 data in a text message).
1008Policy violated.
1009Message too big.
1010Unsupported extension. The client should write the extensions it expected the server to support in the payload.
1011Internal server error.
No1015TLS handshake failure.
3000–3999YesUsed by libraries, frameworks and applications.
4000–4999Private use.

Browser support

[edit]

A secure version of the WebSocket protocol is implemented in Firefox 6,[55] Safari 6, Google Chrome 14,[56]Opera 12.10 andInternet Explorer 10.[57] A detailed protocol test suite report[58] lists the conformance of those browsers to specific protocol aspects.

An older, less secure version of the protocol was implemented in Opera 11 andSafari 5, as well as the mobile version of Safari iniOS 4.2.[59] The BlackBerry Browser in OS7 implements WebSockets.[60] Because of vulnerabilities, it was disabled in Firefox 4 and 5,[61] and Opera 11.[62]Using browser developer tools, developers can inspect the WebSocket handshake as well as the WebSocket frames.[63]

Protocol
Version
Draft dateInternet ExplorerFirefox[64]
(PC)
Firefox
(Android)
Chrome
(PC, Mobile)
Safari
(Mac, iOS)
Opera
(PC, Mobile)
Android Browser
hixie-75February 4, 201045.0.0
hixie-76
hybi-00
May 6, 2010
May 23, 2010
4.0
(disabled)
65.0.111.00
(disabled)
hybi-07, v7April 22, 20116[65][a]
hybi-10, v8July 11, 20117[67][a]714[68]
RFC 6455, v13December, 201110[69]111116[70]612.10[71]4.4

Server implementations

[edit]
  • Apache HTTP Server has supported WebSockets since July, 2013, implemented in version 2.4.5[74][75]
  • Internet Information Services added support for WebSockets in version 8 which was released withWindows Server 2012.[76]
  • lighttpd has supported WebSockets since 2017, implemented in lighttpd 1.4.46.[77] lighttpd mod_proxy can act as a reverse proxy and load balancer of WebSocket applications. lighttpd mod_wstunnel can act as a WebSocket endpoint to transmit arbitrary data, including inJSON format, to a backend application. lighttpd supports WebSockets over HTTP/2 since 2022, implemented in lighttpd 1.4.65.[78]

Security considerations

[edit]

Unlike regular cross-domain HTTP requests, WebSocket requests are not restricted by thesame-origin policy. Therefore, WebSocket servers must validate the "Origin" header against the expected origins during connection establishment, to avoid cross-site WebSocket hijacking attacks (similar tocross-site request forgery), which might be possible when the connection is authenticated withcookies or HTTP authentication. It is better to use tokens or similar protection mechanisms to authenticate the WebSocket connection when sensitive (private) data is being transferred over the WebSocket.[79] A live example of vulnerability was seen in 2020 in the form ofCable Haunt.

Proxy traversal

[edit]

WebSocket protocol client implementations try to detect whether theuser agent is configured to use a proxy when connecting to destination host and port, and if it is, usesHTTP CONNECT method to set up a persistent tunnel.

While the WebSocket protocol itself is unaware of proxy servers and firewalls, it features an HTTP-compatible handshake, thus allowing HTTP servers to share their default HTTP and HTTPS ports (80 and 443 respectively) with a WebSocket gateway or server. The WebSocket protocol defines a ws:// and wss:// prefix to indicate a WebSocket and a WebSocket Secure connection respectively. Both schemes use anHTTP upgrade mechanism to upgrade to the WebSocket protocol. Some proxy servers are transparent and work fine with WebSocket; others will prevent WebSocket from working correctly, causing the connection to fail. In some cases, additional proxy-server configuration may be required, and certain proxy servers may need to be upgraded to support WebSocket.

If unencrypted WebSocket traffic flows through an explicit or a transparent proxy server without WebSockets support, the connection will likely fail.[80]

If an encrypted WebSocket connection is used, then the use ofTransport Layer Security (TLS) in the WebSocket Secure connection ensures that anHTTP CONNECT command is issued when the browser is configured to use an explicit proxy server. This sets up a tunnel, which provides low-level end-to-end TCP communication through the HTTP proxy, between the WebSocket Secure client and the WebSocket server. In the case of transparent proxy servers, the browser is unaware of the proxy server, so noHTTP CONNECT is sent. However, since the wire traffic is encrypted, intermediate transparent proxy servers may simply allow the encrypted traffic through, so there is a much better chance that the WebSocket connection will succeed if WebSocket Secure is used. Using encryption is not free of resource cost, but often provides the highest success rate, since it would be travelling through a secure tunnel.

A mid-2010 draft (version hixie-76) broke compatibility withreverse proxies and gateways by including eight bytes of key data after the headers, but not advertising that data in aContent-Length: 8 header.[81] This data was not forwarded by all intermediates, which could lead to protocol failure. More recent drafts (e.g., hybi-09[82]) put the key data in aSec-WebSocket-Key header, solving this problem.

See also

[edit]

Notes

[edit]
  1. ^abGecko-based browsers versions 6–10 implement the WebSocket object as "MozWebSocket",[66] requiring extra code to integrate with existing WebSocket-enabled code.

References

[edit]
  1. ^"WebSockets Standard".websockets.spec.whatwg.org.Archived from the original on 2023-03-12. Retrieved2022-05-16.
  2. ^"The WebSocket API".www.w3.org.Archived from the original on 2022-06-08. Retrieved2022-05-16.
  3. ^Ian Fette; Alexey Melnikov (December 2011)."Relationship to TCP and HTTP".RFC 6455 The WebSocket Protocol.IETF. sec. 1.7.doi:10.17487/RFC6455.RFC6455.
  4. ^"Adobe Flash Platform – Sockets".help.adobe.com.Archived from the original on 2021-04-18. Retrieved2021-07-28.TCP connections require a "client" and a "server". Flash Player can create client sockets.
  5. ^"The WebSocket API (WebSockets)".MDN Web Docs. Mozilla Developer Network. 2023-04-06.Archived from the original on 2021-07-28. Retrieved2021-07-26.
  6. ^Graham Klyne, ed. (2011-11-14)."IANA Uniform Resource Identifier (URI) Schemes".Internet Assigned Numbers Authority.Archived from the original on 2013-04-25. Retrieved2011-12-10.
  7. ^Ian Fette; Alexey Melnikov (December 2011)."WebSocket URIs".RFC 6455 The WebSocket Protocol.IETF. sec. 3.doi:10.17487/RFC6455.RFC6455.
  8. ^"HTML 5".www.w3.org.Archived from the original on 2016-09-16. Retrieved2016-04-17.
  9. ^"[whatwg] TCPConnection feedback from Michael Carter on 2008-06-18 (whatwg.org from June 2008)".lists.w3.org.Archived from the original on 2016-04-27. Retrieved2016-04-17.
  10. ^"IRC logs: freenode / #whatwg / 20080618".krijnhoetmer.nl.Archived from the original on 2016-08-21. Retrieved2016-04-18.
  11. ^"Web Sockets Now Available In Google Chrome".Chromium Blog.Archived from the original on 2021-12-09. Retrieved2016-04-17.
  12. ^<ian@hixie.ch>, Ian Hickson (6 May 2010)."The WebSocket protocol".Ietf Datatracker.Archived from the original on 2017-03-17. Retrieved2016-04-17.
  13. ^"Interface definition".WHATWG.Archived from the original on 2023-03-12. Retrieved2024-04-10.
  14. ^"new WebSocket(url, protocols)".WHATWG.Archived from the original on 2023-03-12. Retrieved2024-04-30.
  15. ^"close(code, reason)".WHATWG.Archived from the original on 2023-03-12. Retrieved2024-04-10.
  16. ^"When a WebSocket message has been received".WHATWG.Archived from the original on 2023-03-12. Retrieved2024-04-13.
  17. ^ab"When the WebSocket connection is closed; substep 3".WHATWG.Archived from the original on 2023-03-12. Retrieved2024-04-13.
  18. ^abThe WebSocket Connection is Closed. sec. 7.1.4.doi:10.17487/RFC6455.RFC6455.
  19. ^The WebSocket Connection Close Code. sec. 7.1.5.doi:10.17487/RFC6455.RFC6455.
  20. ^The WebSocket Connection Close Reason. sec. 7.1.6.doi:10.17487/RFC6455.RFC6455.
  21. ^"CONNECTING".WHATWG.Archived from the original on 2023-03-12. Retrieved2024-04-13.
  22. ^Client Requirements. p. 14. sec. 4.1.doi:10.17487/RFC6455.RFC6455.
  23. ^"OPEN".WHATWG.Archived from the original on 2023-03-12. Retrieved2024-04-10.
  24. ^_The WebSocket Connection is Established_. p. 20.doi:10.17487/RFC6455.RFC6455.
  25. ^"CLOSING".WHATWG.Archived from the original on 2023-03-12. Retrieved2024-04-10.
  26. ^The WebSocket Closing Handshake is Started. sec. 7.1.3.doi:10.17487/RFC6455.RFC6455.
  27. ^"CLOSED".WHATWG.Archived from the original on 2023-03-12. Retrieved2024-04-10.
  28. ^Opening Handshake. sec. 1.3.doi:10.17487/RFC6455.RFC6455.
  29. ^Client requirement 8. p. 18.doi:10.17487/RFC6455.RFC6455.
  30. ^Client requirement 9. p. 18.doi:10.17487/RFC6455.RFC6455.
  31. ^Client requirement 7. p. 18.doi:10.17487/RFC6455.RFC6455.
  32. ^Server step 5.4. p. 24.doi:10.17487/RFC6455.RFC6455.
  33. ^Client requirement 6. p. 18.doi:10.17487/RFC6455.RFC6455.
  34. ^Server step 5.3. p. 24.doi:10.17487/RFC6455.RFC6455.
  35. ^Client requirement 5. p. 17.doi:10.17487/RFC6455.RFC6455.
  36. ^Server step 5.2. p. 24.doi:10.17487/RFC6455.RFC6455.
  37. ^Client requirement 10. p. 18.doi:10.17487/RFC6455.RFC6455.
  38. ^Protocol Overview. sec. 1.2.doi:10.17487/RFC6455.RFC6455.
  39. ^"Main Goal of WebSocket protocol". IETF.Archived from the original on 22 April 2016. Retrieved25 July 2015.The computation [...] is meant to prevent a caching intermediary from providing a WS-client with a cached WS-server reply without actual interaction with the WS-server.
  40. ^Fragmentation. sec. 5.4.doi:10.17487/RFC6455.RFC6455.
  41. ^John A. Tamplin; Takeshi Yoshino (2013).A Multiplexing Extension for WebSockets.IETF. I-D draft-ietf-hybi-websocket-multiplexing.
  42. ^FIN. p. 28.doi:10.17487/RFC6455.RFC6455.
  43. ^RSV1, RSV2, RSV3. p. 28.doi:10.17487/RFC6455.RFC6455.
  44. ^Mask. p. 29.doi:10.17487/RFC6455.RFC6455.
  45. ^Payload length. p. 29.doi:10.17487/RFC6455.RFC6455.
  46. ^Overview. sec. 5.1.doi:10.17487/RFC6455.RFC6455.
  47. ^Client-to-Server Masking. sec. 5.3.doi:10.17487/RFC6455.RFC6455.
  48. ^Closing Handshake. sec. 1.4.doi:10.17487/RFC6455.RFC6455.
  49. ^Close. sec. 5.5.1.doi:10.17487/RFC6455.RFC6455.
  50. ^Control Frames. sec. 5.5.doi:10.17487/RFC6455.RFC6455.
  51. ^Ping. sec. 5.5.2.doi:10.17487/RFC6455.RFC6455.
  52. ^Pong. sec. 5.5.3.doi:10.17487/RFC6455.RFC6455.
  53. ^Reserved Status Code Ranges. sec. 7.4.2.doi:10.17487/RFC6455.RFC6455.
  54. ^Defined Status Codes. sec. 7.4.1.doi:10.17487/RFC6455.RFC6455.
  55. ^Dirkjan Ochtman (May 27, 2011)."WebSocket enabled in Firefox 6".Mozilla.org. Archived fromthe original on 2012-05-26. Retrieved2011-06-30.
  56. ^"Chromium Web Platform Status".Archived from the original on 2017-03-04. Retrieved2011-08-03.
  57. ^"WebSockets (Windows)". Microsoft. 2012-09-28.Archived from the original on 2015-03-25. Retrieved2012-11-07.
  58. ^"WebSockets Protocol Test Report". Tavendo.de. 2011-10-27. Archived fromthe original on 2016-09-22. Retrieved2011-12-10.
  59. ^Katie Marsal (November 23, 2010)."Apple adds accelerometer, WebSockets support to Safari in iOS 4.2".AppleInsider.com.Archived from the original on 2011-03-01. Retrieved2011-05-09.
  60. ^"Web Sockets API".BlackBerry. Archived fromthe original on June 10, 2011. Retrieved8 July 2011.
  61. ^Chris Heilmann (December 8, 2010)."WebSocket disabled in Firefox 4".Hacks.Mozilla.org.Archived from the original on 2017-03-06. Retrieved2011-05-09.
  62. ^Aleksander Aas (December 10, 2010)."Regarding WebSocket".My Opera Blog. Archived fromthe original on 2010-12-15. Retrieved2011-05-09.
  63. ^Wang, Vanessa; Salim, Frank; Moskovits, Peter (February 2013)."APPENDIX A: WebSocket Frame Inspection with Google Chrome Developer Tools".The Definitive Guide to HTML5 WebSocket. Apress.ISBN 978-1-4302-4740-1. Archived fromthe original on 31 December 2015. Retrieved7 April 2013.
  64. ^"WebSockets (support in Firefox)".developer.mozilla.org. Mozilla Foundation. 2011-09-30. Archived fromthe original on 2012-05-26. Retrieved2011-12-10.
  65. ^"Bug 640003 - WebSockets - upgrade to ietf-06". Mozilla Foundation. 2011-03-08.Archived from the original on 2021-04-01. Retrieved2011-12-10.
  66. ^"WebSockets - MDN".developer.mozilla.org. Mozilla Foundation. 2011-09-30. Archived fromthe original on 2012-05-26. Retrieved2011-12-10.
  67. ^"Bug 640003 - WebSockets - upgrade to ietf-07(comment 91)". Mozilla Foundation. 2011-07-22.Archived from the original on 2021-04-01. Retrieved2011-07-28.
  68. ^"Chromium bug 64470".code.google.com. 2010-11-25.Archived from the original on 2015-12-31. Retrieved2011-12-10.
  69. ^"WebSockets in Windows Consumer Preview".IE Engineering Team. Microsoft. 2012-03-19.Archived from the original on 2015-09-06. Retrieved2012-07-23.
  70. ^"WebKit Changeset 97247: WebSocket: Update WebSocket protocol to hybi-17".trac.webkit.org.Archived from the original on 2012-01-05. Retrieved2011-12-10.
  71. ^"A hot Opera 12.50 summer-time snapshot". Opera Developer News. 2012-08-03. Archived fromthe original on 2012-08-05. Retrieved2012-08-03.
  72. ^"Welcome to nginx!".nginx.org. Archived fromthe original on 17 July 2012. Retrieved3 February 2022.
  73. ^"Using NGINX as a WebSocket Proxy".NGINX. May 17, 2014.Archived from the original on October 6, 2019. RetrievedNovember 3, 2019.
  74. ^"Overview of new features in Apache HTTP Server 2.4".Apache.Archived from the original on 2020-11-11. Retrieved2021-01-26.
  75. ^"Changelog Apache 2.4".Apache Lounge.Archived from the original on 2021-01-22. Retrieved2021-01-26.
  76. ^"IIS 8.0 WebSocket Protocol Support".Microsoft Docs. 28 November 2012.Archived from the original on 2020-02-18. Retrieved2020-02-18.
  77. ^"Release-1 4 46 - Lighttpd - lighty labs".Archived from the original on 2021-01-16. Retrieved2020-12-29.
  78. ^"Release-1 4 65 - Lighttpd - lighty labs".Archived from the original on 2024-05-03. Retrieved2024-05-03.
  79. ^Christian Schneider (August 31, 2013)."Cross-Site WebSocket Hijacking (CSWSH)".Web Application Security Blog.Archived from the original on December 31, 2016. RetrievedDecember 30, 2015.
  80. ^Peter Lubbers (March 16, 2010)."How HTML5 Web Sockets Interact With Proxy Servers".Infoq.com. C4Media Inc.Archived from the original on 2016-05-08. Retrieved2011-12-10.
  81. ^Willy Tarreau (2010-07-06)."WebSocket -76 is incompatible with HTTP reverse proxies".ietf.org (email). Internet Engineering Task Force.Archived from the original on 2016-09-17. Retrieved2011-12-10.
  82. ^Ian Fette (June 13, 2011)."Sec-WebSocket-Key".The WebSocket protocol, draft hybi-09. sec. 11.4. RetrievedJune 15, 2011.Archived February 1, 2016, at theWayback Machine

External links

[edit]
  • Features
  • standards
  • protocols
Features
Web standards
Protocols
Active
Blink-based
Proprietary
FOSS
Gecko-based
WebKit-based
Multi-engine
Other
Discontinued
Blink-based
Gecko-based
MSHTML-based
WebKit-based
Other
Protocols
Server APIs
Apache modules
Topics
Browser APIs
Web APIs
WHATWG
W3C
Khronos
Others
Topics
Related topics
Retrieved from "https://en.wikipedia.org/w/index.php?title=WebSocket&oldid=1278986634"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp