任何人都可以请点我朝着正确的方向在制作使用服务器的HTTP持久连接AFNetworking
库。 我已经看了看下面的代码:
NSURL *URL = [NSURL URLWithString:@"http://example.com"];
AFRocketClient *client = [[AFRocketClient alloc] init];
[client SUBSCRIBE:@"/resources" usingBlock:^(NSArray *operations, NSError *error) {
for (AFJSONPatchOperation *operation in operations) {
switch (operation.type) {
case AFJSONAddOperationType:
[resources addObject:operation.value];
break;
default:
break;
}
}
} error:nil];
从https://github.com/AFNetworking/AFRocketClient
这我觉得是不言自明???