WebSocket – First steps – part 001.

I do not think that is so sought after. Most people prefer products WebRTC.
Also on good reason of using WebRTC instead of Websocket is latency of streaming.
Is the protocol for two-way communication with a remote host.
The WebSocket interface and defines a full-duplex communication channel and operates through a single socket over the Web. The WebSocket detects the presence of a proxy server.
The next step is to automatically sets up a tunnel to pass through the proxy.
The tunnel is established by issuing an HTTP CONNECT statement to the proxy server.
Let’s see one simple example:

It is one simple open, close and sending message with websocket and javascript show events.
The most important part is to define the websocket:

The next steps is to use it with default javascript event system and window show message.

admin

born 1976

Posted in All, HTML 5, javascript. Tagged with , , , , , .