/AZSocketIO

A socket.io client for objective-c. Cocoapods-friendly. Appledocs. Built of AFNetworking and SocketRocket. Websockets + XHR.

Primary LanguageObjective-COtherNOASSERTION

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