From 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:43:23 -0500 Subject: initial commit --- files/th/web/api/websockets_api/index.html | 101 +++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 files/th/web/api/websockets_api/index.html (limited to 'files/th/web/api/websockets_api/index.html') diff --git a/files/th/web/api/websockets_api/index.html b/files/th/web/api/websockets_api/index.html new file mode 100644 index 0000000000..fe713179a4 --- /dev/null +++ b/files/th/web/api/websockets_api/index.html @@ -0,0 +1,101 @@ +--- +title: The WebSocket API (WebSockets) +slug: Web/API/WebSockets_API +translation_of: Web/API/WebSockets_API +--- +

{{DefaultAPISidebar("Websockets API")}}

+ +

The WebSocket API is an advanced technology that makes it possible to open a two-way interactive communication session between the user's browser and a server. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply.

+ +
+

Note: While a WebSocket connection is functionally somewhat similar to standard Unix-style sockets, they are not related.

+
+ +

Interfaces

+ +
+
WebSocket
+
The primary interface for connecting to a WebSocket server and then sending and receiving data on the connection.
+
CloseEvent
+
The event sent by the WebSocket object when the connection closes.
+
MessageEvent
+
The event sent by the WebSocket object when a message is received from the server.
+
+ +

Guides

+ + + +

Tools

+ + + + + + + +

Specifications

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComments
{{SpecName("HTML WHATWG", "web-sockets.html", "WebSocket API")}}{{Spec2("HTML WHATWG")}}
WebSocketsCandidate Recommendation
{{RFC(6455, "The WebSocket Protocol")}}IETF RFC
+ +

Browser compatibility

+ + + +

{{Compat("api.WebSocket")}}

+ +

See also

+ + -- cgit v1.2.3-54-g00ecf