A socket.io client for objective-c. Cocoapods-friendly. Appledocs. Built of AFNetworking and SocketRocket. Websockets + XHR.
Pull request Compare This branch is 15 commits behind lukabernardi:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
AZSocketIO.xcodeproj
AZSocketIO
AZSocketIOTests
Tester
test-server
.gitignore
AZSocketIO.podspec
AppledocSettings.plist
LICENSE
Podfile
README.md

README.md

AZSocketIO

AZSocketIO is a socket.io client for iOS. It:

  • Supports websockets and xhr-polling transports
  • Is about alpha stage
  • Is heavily reliant on blocks for it's API
  • Has appledocs for all user facing classes
  • Welcomes patches and issues

It does not currently support namespacing a socket.

Dependencies

AZSocketIO uses cocoapods, so you shouldn't have to think too much about dependencies, but here they are.

AZSocketIO uses NSJSONSerialization, so it's iOS 5+.

Usage

AZSocketIO *socket = [[AZSocketIO alloc] initWithHost:@"localhost" andPort:@"9000" secure:NO];
[socket setEventRecievedBlock:^(NSString *eventName, id data) {
    NSLog(@"%@ : %@", eventName, data);
}];
[socket connectWithSuccess:^{
    [socket emit:@"Send Me Data" args:@"cows" error:nil];
} andFailure:^(NSError *error) {
    NSLog(@"Boo: %@", error);
}];

Author

Pat Shields

Contributors

License

Apache 2.0