/PhoneGap-Plugin-WebSocket

WebSocket support for PhoneGap (iPhone)

Primary LanguageObjective-C

WebSocket PhoneGap iPhone Plugin

PLEASE NOTE: these are early days - the initial plugin works, but it's not been tested very thoroughly yet - please help me test and make this plugin better.

Usage

  • Copy WebSocketCommand.m/h to your project.
  • Copy websocket.js to your www directory.

Then use the WebSocket as according to the specification.

Known issues & untested cases

This list might be bigger than I think - but here's what I can think of:

  • Doesn't support paths on ws urls, i.e. ws://example.com:8000 works, but ws://example.com/myapp:8000 won't
  • I've not tested multiple sockets at all - I'm not sure what will happen
  • I don't think the socket is being disconnected on exit. I would expect the app to release the socket, but on my server side I wasn't seeing the sockets being released - kinda worrying...though it might just be that I missed that.

Credit

This was written hacked by me, by using the code from cocoa-websocket and the code from GapSocket.

I don't know how to write Objective-C so if this is a complete mess, I blame laziness entirely.