Thanks Dominic. Yes, the main thread does REP and worker does REQ. Attached the tar of three files. (Sorry for the wide distribution of ~8K.)
On Mon, Dec 26, 2011 at 12:48 PM, Dominic Tarr <[email protected]>wrote: > can you gist the code? > > it's hard to help if you we can't see your code. > > I think the main thread should be REPLY, and the worker should be REQUEST, > is that how you have it? > > On Tue, Dec 27, 2011 at 9:29 AM, Ashok Chippa <[email protected]>wrote: > >> Hi, >> >> I am trying to send a small msg from a thread to its main process using >> inproc. I have tried >> several types: REP-REQ, XREP-XREQ, ROUTER-DEALER, PUB-SUB, etc. without >> success. >> Here's what I get when using REP-REQ: >> achippa@ubuntu:~/projects/groupchat$ ./client 10.1.1.1 1111 >> client started with ipaddress 10.1.1.1 port 1111 >> connected to user socket >> C foo >> test_create_group: packed size = 21 >> 0*8*00*1*000 18002000 28003203 666f6f38 >> 0040004a 00 >> main: rcvd msg size = 21 >> 0*0*00*0*000 18002000 28003203 666f6f38 >> 0040004a 00 >> gc_client_handle_message >> message 'group_chat_msg': missing required field 'direction' >> Segmentation fault >> >> When I replace REP-REQ with XREP-XREQ I get this: >> >> achippa@ubuntu:~/projects/groupchat$ ./client 10.1.1.1 1111 >> client started with ipaddress 10.1.1.1 port 1111 >> connected to user socket >> C foo >> test_create_group: packed size = 21 >> 08001000 18002000 28003203 666f6f38 >> 0040004a 00 >> main: rcvd msg size = 17 >> 00ffffff8d1115 1f16ffffffe147 2affffff93ffffffd24a 1849ffffffbcffffffe3 >> 22 >> gc_client_handle_message >> data too short after length-prefix of 1222931 >> gc_client_handle_message: unpack returned NULL >> client: gc_client.c:1020: main: Assertion `rc == 0' failed. >> Aborted >> >> More than reading about zmq, I need pointers from those who have more >> experience with it. Any pointers to get around these, please? >> >> Thanks, >> Ashok >> >> >> >> _______________________________________________ >> zeromq-dev mailing list >> [email protected] >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >
gc.tar.gz
Description: GNU Zip compressed data
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
