Using WebSockets in Objective-C

10,229

We just released SocketRocket. It supports the latest standard, RFC 6455, which neither ZTWebSocket, nor Unitt does. No CocoaAsyncSocket needed to boot.

Also, libPusher is experimenting with SocketRocket too.

Share:
10,229
John Smith
Author by

John Smith

Updated on June 04, 2022

Comments

  • John Smith
    John Smith almost 2 years

    I have tried, unsuccessfully, to use websockets in objective-c with the following two libraries:

    http://code.google.com/p/unitt/wiki/UnittWebSocketClient

    https://github.com/zootreeves/iOS-WebSockets

    In both cases I was unable to establish even a basic connection to a server (runnning on localhost). I was wondering if someone could please provide or point me in the direction of some code that will just simply connect to a server via a websocket and/or perform a handshake.

    Ideally, it would be nice if the code could use one of the above libraries, but at this point I'm open to anything that'd work.

    I've posted about some issues with UnitT beore but I haven't received any feedback so I'm not sure exactly what step I'm messing up on. Appreciate any help, thanks!

    • Cameron Lowell Palmer
      Cameron Lowell Palmer almost 12 years
      This WebSocket library is out of date. The final RFC (6455) is very different from earlier implementations so you should look for something more recent or write your own.
  • Gary
    Gary almost 12 years
    Can SocketRocket mark the connection as VOIP connection for using in background based VOIP apps?
  • mikelikespie
    mikelikespie almost 12 years
    @Gary I am unaware of it being able to. Please file an issue on github with more information if you're interested in the feature.
  • madlymad
    madlymad about 8 years
    libPusher link is broken are you referring to this github.com/lukeredpath/libPusher ?