I have not tried it against iOS5, but when I run the following code I
get a specific error. I have included my code snippets below. I think
the root of the problem is that the server running on
websocket.org is
many revisions out of date. It looks to be hixie75/75ish. The spec is
now up to hybi-rev12 I think. What version of the specification is
your server running on localhost? You want to make sure you use the
right client version for the right server version.
//logic to connect
//------------------------------------------
ws = [[WebSocket07 webSocketWithURLString:@"ws://
echo.websocket.org" delegate:self origin:@"
http://websocket.org"
protocols:nil tlsSettings:nil verifyHandshake:YES] retain];
[ws.open];
//------------------------------------------
//web socket delegate error method
//------------------------------------------
- (void) didReceiveError: (NSError*) aError
{
NSLog(@"Error: %@", [aError localizedDescription]);
}
//------------------------------------------
The output in my console is...
Error: The operation couldn’t be completed. Connection refused
Josh
On Sep 5, 4:08 am, morgler <
morg...@googlemail.com> wrote:
> Hi,
>
> I can't seem to connect to the ws://
echo.websocket.org web socket with
> unitt through the iPhone simulator. Basically I created a simple
> iPhone app and used all the example code fromhttp://
code.google.com/p/unitt/wiki/UnittWebSocketClient. However,