jeremy-w/objc-zmq — Issue #7: Unable to send request to server
Author: centurionas
Created: 2012-02-02 09:05:47+00:00
State: open

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. What I'm doing wrong?