WebSockets have been one of the most touted features of modern browsers – and the WebSocket protocol is now being used by many different web applications.

Recently I was pointed to a WebSockets client library created using Objective-C which was created by its developers so that they could perform better iOS network debugging and used the library to communicate with Google Chrome’s remote debugging API.

The library was created by the develoeprs at Squareup, and here are some of the advantages they list for developers with WebSockets:

Using WebSockets has its advantages over raw TCP:

Not having to reinvent your own framing protocol. The WebSocket Protocol is pretty efficient and flexible. You probably won’t write a better one.

Reuse most infrastructure made for HTTP/1.1 such as routing, reverse proxying, authentication, etc. (However, there are some proxies that don’t support WebSockets yet)

Reuse server logic built to talk with browsers. For example, you could write a native iPad client for Cube.

Communicate with Chrome Developer Tools (more to come on this in future posts)