AZSocketIO 0.0.6

AZSocketIO 0.0.6

TestsTested
LangLanguage Obj-CObjective C
License Apache 2
ReleasedLast Release Dec 2014

Maintained by Luca Bernardi.



 
Depends on:
SocketRocket~> 0.x
AFNetworking~> 2.x
 

  • By
  • Luca Bernardi and Patrick Shields

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