WebSocket

What Is It?

WebSocket is a protocol providing full-duplex communications channels over a single TCP connection. The WebSocket protocol was standardized by the IETF as RFC 6455 in 2011, and the WebSocket API in Web IDL is being standardized by the W3C.

Enough said. If it's good enough for the IETF, then it's good enough for me.

As for the W3C - whatever.

What is it good for?


Its use is limited only by the imagination, but perhaps an example would be helpful.

Use Case: Robot Control Page

Purpose: asynchronous notification on the page when a robot registers for control.

Success Case: 
  1. User logs onto Robot Control Page
  2. User waits
  3. Robot registers for control
  4. Robot Control Page is automatically updated with registration information
  5. User can now control robot

Demo


(Isn't it cool?)

Client Code


(Easy-peasy)

Server Code

(Oh, so sophisticated.)

Questions?

WebSockets

By naiveroboticist

WebSockets

This is for my lightning talk on WebSockets

  • 412