Yes, I am aware of How to incorporate WebSockets into a Cocoa application, but that question is almost a year old and it is clear that the selected answer (zimt) is no longer an acceptable solution.

Is there any WebSocket client that is usable from within my iOS application? It can be C or Objective-C, but it has to have full support for WebSocket (Zimt doesn't handle Sec-WebSocket-Key1 and Sec-WebSocket-Key2).

Accepted Answer

You can check out the UnitT Web Socket Client. It is intended for use in iOS apps using Objective-C. However, Sec-WebSocket-Key1 & Sec-WebSocket-Key2 are part of an earlier revision of web sockets. Since version 6, the client now needs to support Sec-WebSocket-Accept. Unfortunately, not all the servers use this yet. UnitT Web Socket Client allows you turn this check on or off programmatically. In addition, it works with both ws & wss.

I am the author and have been using it in some of my projects with success. Let me know if you run into any trouble and I will do what I can to help.

Written by Josh Morris
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki