测试已测试 | ✓ |
语言语言 | Obj-CObjective C |
许可证 | Apache 2 |
发布最新发布 | 2014年12月 |
由 Dirk Eisenberg 维护。
依赖项 | |
SocketRocket | ~> 0.x |
AFNetworking | ~> 2.x |
AZSocketIO 是一个适用于 iOS 的 socket.io 客户端。它
目前不支持对 socket 进行命名空间
最新的稳定版本(0.0.6)支持 socket.io ~> 0.9。支持 socket.io 1.0 的新版本目前正在开发中。
AZSocketIO 使用 Cocoapods,因此您不需要太多考虑依赖项,但它们如下。
AZSocketIO *socket = [[AZSocketIO alloc] initWithHost:@"localhost" andPort:@"9000" secure:NO];
[socket setEventReceivedBlock:^(NSString *eventName, id data) {
NSLog(@"%@ : %@", eventName, data);
}];
[socket connectWithSuccess:^{
[socket emit:@"Send Me Data" args:@"cows" error:nil];
} andFailure:^(NSError *error) {
NSLog(@"Boo: %@", error);
}];
Luca Bernardi
Pat Shields
Apache 2.0