Currently, I'm trying to get the lib working in my project, but with no results. I copied its source classes and objective-c wrapper classes (ZMQContext, ZMQSocket) to my project and was able to build it successfully. However, I'm getting "resource temporary is unavailable" when trying to send a request to a server. Here's my code:
ZMQContext *context = [[ZMQContext alloc] initWithIOThreads:1];
ZMQSocket *socket =[context socketWithType:ZMQ_REQ];
BOOL success = [socket connectToEndpoint:@"tcp://X.X.X.X:X"];
if (success){
NSLog(@"connected to server");
}
NSData *data = [self RequestData];
success = [socket sendData:data withFlags:0];
if (success){
NSLog(@"Data sent to server");
}
Somehow, "connectToEndpoint" call is successful, however i can't' say the same about send. I can assure the host is reachable via the port, because server side socket communication version is already in production state. Just curious, has anyone zeromq working for iOS?
UPDATE: I have also posted the same question as an issue to github project here and got the answer: "You only show one side of the code here. If the other side is not running ZMQ, you will naturally be unable to exchange messages.". This means we cannot use ZMQ as a client only (to existing server that is implemented with other lib or custom solution). If it's true then ZMQ is very limited.