https://github.com/remy/phonegap-plugin-websocket
WebSocket support for PhoneGap (iPhone)
https://github.com/remy/phonegap-plugin-websocket
Last synced: 7 months ago
JSON representation
WebSocket support for PhoneGap (iPhone)
- Host: GitHub
- URL: https://github.com/remy/phonegap-plugin-websocket
- Owner: remy
- Created: 2010-08-24T00:28:30.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2013-07-30T10:24:04.000Z (about 12 years ago)
- Last Synced: 2025-03-19T01:59:57.917Z (7 months ago)
- Language: Objective-C
- Homepage:
- Size: 84 KB
- Stars: 85
- Watchers: 9
- Forks: 22
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WebSocket PhoneGap iPhone Plugin
**NOTE: this plugin is no longer required as iOS provides native WebSockets to PhoneGap as of iOS v4 - some moons ago, so you don't need this project any more**.
I'm just leaving this here for historical purposes.
## Usage
* Copy WebSocketCommand.m/h to your project.
* Copy websocket.js to your www directory.Then use the WebSocket as according to [the specification](http://dev.w3.org/html5/websockets/).
## 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
writtenhacked by me, by using the code from [cocoa-websocket](http://github.com/erichocean/cocoa-websocket) and the code from [GapSocket](http://github.com/purplecabbage/PhoneGap-Plugins/tree/master/GapSocket/).I don't know how to write Objective-C so if this is a complete mess, I blame laziness entirely.