如何使用AFNetworking库与服务器进行HTTP持久连接

任何人都可以请指出我在正确的方向使用AFNetworking库与服务器的HTTP持久连接。 我已经看了下面的代码:

 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

我觉得这不是自我解释?

Interesting Posts