Re: [zeromq-dev] Change of type after sending over

2011-12-26 Thread Jon Dyte
On 26/12/11 06:27, Hor Meng Yoong wrote: > Hi: > > import struct > import time > import zmq > from zmq.eventloop import ioloop, zmqstream > loop = ioloop.IOLoop.instance() > > ctx = zmq.Context() > s = ctx.socket(zmq.REP) > s.bind('tcp://127.0.0.1: ') > stream = zmqstream

Re: [zeromq-dev] Change of type after sending over

2011-12-26 Thread Hor Meng Yoong
Hi Jon: I have fixed it. Thank. import struct import time import zmq from zmq.eventloop import ioloop, zmqstream loop = ioloop.IOLoop.instance() ctx = zmq.Context() s = ctx.socket(zmq.REP) s.bind('tcp://127.0.0.1:') stream = zmqstream.ZMQStream(s, loop) def echo(msg): msg = msg[0] (a,

[zeromq-dev] rcvd msg does not match sent msg

2011-12-26 Thread Ashok Chippa
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 client started with ip

Re: [zeromq-dev] rcvd msg does not match sent msg

2011-12-26 Thread Dominic Tarr
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 wrote: > Hi, > > I am trying to send a small msg from a thread to its main p

Re: [zeromq-dev] rcvd msg does not match sent msg

2011-12-26 Thread Ashok Chippa
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 wrote: > can you gist the code? > > it's hard to help if you we can't see your code. > > I think the main th