Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7510901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:22:15+00:00 2026-05-29T23:22:15+00:00

Currently, I’m trying to get the lib working in my project, but with no

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T23:22:16+00:00Added an answer on May 29, 2026 at 11:22 pm

    I will clarify a little bit for those who also had stumbled upon the application of ZeroMQ, as there’s a lack of fundamental info about how the stuff works. In my situation, I have existing server that accepts connections via socket so the data can be send and received. All the data that goes through sockets, goes through tcp packets (at low level) but you don’t have to worry about how data is transferred in tcp packets. With sockets, everything you need know is that you need to construct a packet of bytes and send it to the server. The server also will return you a packet of bytes and it’s your responsibility how you will interpret those bytes. For example, if I want to send 2 bytes of data to the server, for example 1 byte of value 1 and another byte of value 2, I will need to construct and send 00000001 00000010 (without space 🙂 ). The server will also return me some bytes.

    The thing is with raw socket communication, you have manually to implement a protocol – the rules. Why? Because you have manually to check received packet if it has correct length, correct data. The server and client must both agree on what is the data format, which byte is status, which bytes represent packet length and which bytes represent data. For example imagine a server is sending you raw bytes:

    10001000 10010111 01101001 01111110 01110110 11100001

    Both, client and server need to know what every byte means. So, in my situation, the server already has it’s own parser and the rules (it might be named as custom protocol) about what sequence of the bytes should come. For example, 1 byte is the request command, 4 bytes is the packet size, 1 byte is the status of request and the rest bytes are the data. When you are communicating with servers using higher protocols like HTTP, all the stuff is done for free, you just push or grab the data and that’s it. Also, the similar is with ZeroMQ as it already has its own parsing rules, so you just push and grab the data, but as mentioned before, both client and server need to use that lib.

    When I was posting the question, I was looking for some lib that facilitates socket communication, but does not has it own the protocol. Currently, I’m trying to use AsyncSocket.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently It just opens up the xml, but i want to get a dialog
Currently working on database part of android project. The main aim of the project
Currently I’m trying to get the hang of a block copy with my current
Currently i m working on a project where there are users with four roles
Currently I have a UITableView with its data source being an NSFetchedResultsController . The
Currently i am working on 1 site, its requirement is that, i have to
Currently we use jQuery to add RIA goodness to our apps, but recently we
Currently I'm trying to write my first Python library and I've encountered the following
Currently I'm prototyping search with Lucene.Net-2.0-004 on a web application. It's working very well,
currently I'm developing an app for WP7 but came across a little problem with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.