问题
Can anyone please point me in the right direction in making a HTTP persistent connection with server using AFNetworking
library. I've already looked at the following code:
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];
from https://github.com/AFNetworking/AFRocketClient
Which I felt is not self explanatory???
来源:https://stackoverflow.com/questions/20326936/how-to-make-a-http-persistent-connection-with-server-using-afnetworking-library