{"action":"created","issue":{"url":"https://api.github.com/repos/booksbyus/zguide/issues/665","repository_url":"https://api.github.com/repos/booksbyus/zguide","labels_url":"https://api.github.com/repos/booksbyus/zguide/issues/665/labels{/name}","comments_url":"https://api.github.com/repos/booksbyus/zguide/issues/665/comments","events_url":"https://api.github.com/repos/booksbyus/zguide/issues/665/events","html_url":"https://github.com/booksbyus/zguide/issues/665","id":187046981,"number":665,"title":"C example for Multithreaded zmq client","user":{"login":"jawadatgithub","id":12063236,"avatar_url":"https://avatars.githubusercontent.com/u/12063236?v=3","gravatar_id":"","url":"https://api.github.com/users/jawadatgithub","html_url":"https://github.com/jawadatgithub","followers_url":"https://api.github.com/users/jawadatgithub/followers","following_url":"https://api.github.com/users/jawadatgithub/following{/other_user}","gists_url":"https://api.github.com/users/jawadatgithub/gists{/gist_id}","starred_url":"https://api.github.com/users/jawadatgithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jawadatgithub/subscriptions","organizations_url":"https://api.github.com/users/jawadatgithub/orgs","repos_url":"https://api.github.com/users/jawadatgithub/repos","events_url":"https://api.github.com/users/jawadatgithub/events{/privacy}","received_events_url":"https://api.github.com/users/jawadatgithub/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-03T12:31:19Z","updated_at":"2016-11-03T20:17:00Z","closed_at":null,"body":"I want C example for Multithreaded zmq client, I am already using Multithreaded server, but I have requirements to make each client send requests from multithreads not single thread.\r\n\r\nI had look to:\r\nhttp://zguide.zeromq.org/c:asyncsrv\r\nhttps://github.com/booksbyus/zguide/blob/master/examples/C/\r\n\r\nbut I didn't see client example that uses multithreads of ZMQ_DEALER socket talking to Multithreaded server (ZMQ_ROUTER socket)\r\n\r\nso I am looking for DEALER and ROUTER pattern. I want the client (DEALER) to be multithreaded:\r\nif I follow same analogy of multi-threaded server example, I need proxy that bind multi dealers threads, correct?\r\n\r\ncurrently my client is similar to hello world C:\r\n\r\n```\r\n\tctx = zctx_new ();\r\n\tclient = zsocket_new (ctx, ZMQ_REQ);\r\n\tassert (client);\r\n\tzsocket_connect (client, config.SERVER_ENDPOINT);\r\n\r\n        // SKIPPED: I get the data (hm->body.p) to be send though zmq...\r\n\r\n\t//  We send a request, then we work to get a reply\r\n\tzstr_sendf(client, \"%.*s\", (int) hm->body.len,hm->body.p);\r\n        char *reply = zstr_recv (client);\r\n        if (reply)\t{\r\n                zsys_info (\"server replied (%s)\", reply);\r\n\t        free (reply);\r\n\t } \r\n```\r\n\r\nPlease help me make my C client  to be Multithreaded zmq client"},"comment":{"url":"https://api.github.com/repos/booksbyus/zguide/issues/comments/258261210","html_url":"https://github.com/booksbyus/zguide/issues/665#issuecomment-258261210","issue_url":"https://api.github.com/repos/booksbyus/zguide/issues/665","id":258261210,"user":{"login":"jawadatgithub","id":12063236,"avatar_url":"https://avatars.githubusercontent.com/u/12063236?v=3","gravatar_id":"","url":"https://api.github.com/users/jawadatgithub","html_url":"https://github.com/jawadatgithub","followers_url":"https://api.github.com/users/jawadatgithub/followers","following_url":"https://api.github.com/users/jawadatgithub/following{/other_user}","gists_url":"https://api.github.com/users/jawadatgithub/gists{/gist_id}","starred_url":"https://api.github.com/users/jawadatgithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jawadatgithub/subscriptions","organizations_url":"https://api.github.com/users/jawadatgithub/orgs","repos_url":"https://api.github.com/users/jawadatgithub/repos","events_url":"https://api.github.com/users/jawadatgithub/events{/privacy}","received_events_url":"https://api.github.com/users/jawadatgithub/received_events","type":"User","site_admin":false},"created_at":"2016-11-03T20:17:00Z","updated_at":"2016-11-03T20:17:00Z","body":"I posted more details in below stackoverflow question:\r\nhttp://stackoverflow.com/questions/40404493/zmq-multithread-c-client\r\n\r\nI will look to both links you shared."}}
{"actor":{"display_login":"jawadatgithub"}}