I just made a simple real-time text chat application using SocketRocket. It works great on iOS 6.0 and 5.1 but when I try to run it on 5.0 when connecting I get the following error...
Websocket Failed With Error Error Domain=NSOSStatusErrorDomain Code=-9800 "The
operation couldn’t be completed. (OSStatus error -9800.)"
UserInfo=0x6e506e0 {}
Does anyone have any idea what this could mean or how to fix it? I browsed the issues on github but couldnt find anything and its claimed to work on iOS5+.
EDIT: To add, this is when I test on simulator. I dont have a device that has 5.0, so im not sure if fails on the phone in the same way. Also, if I use ws as opposed to wss (encrypted), it seems to work fine.
You can also include SocketRocket as a subproject inside of your application if you'd prefer, although we do not recommend this, as it will increase your indexing time significantly. To do so, just drag and drop the SocketRocket.xcodeproj file into your workspace.
Make sure your running destination is either your Mac or any Simulator SocketRocket includes a demo app, TestChat. It will "chat" with a listening websocket on port 9900. The sever takes a message and broadcasts it to all other connected clients. It requires some dependencies though to run.
You can compare to what modern browsers look like here. SocketRocket currently conforms to all core ~300 of Autobahn 's fuzzing tests (aside from two UTF-8 ones where it is merely non-strict tests 6.4.2 and 6.4.4). TLS (wss) support, including self-signed certificates.
SRWebSocket will retain itself between - (void)open and when it closes, errors, or fails. This is similar to how NSURLConnection behaves (unlike NSURLConnection, SRWebSocket won't retain the delegate). Included are setup scripts for the python testing environment. It comes packaged with vitualenv so all the dependencies are installed in userland.
This error has been reported over problems with iOS's SSL authentication. One report suggested changing from kCFStreamSocketSecurityLevelTLSv1 to kCFStreamSocketSecurityLevelSSLv3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With