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)
Included on the Github page you’ll also find an example on developing a chat application with the library.
A very useful library for web communications in iOS apps – thanks to Pardeep for the submission.
Submit A Resource
Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?
You can submit the url here.
The resources we feel will appeal to our readers the most will be posted on the front page.