[zeromq-dev] Client Server Model in Python
Abhishek K
abhishek.kona at gmail.com
Tue Aug 24 15:05:57 CEST 2010
Hi
I am new to ZeroMQ
I am using a Client Server Model in Python.
This is the basic outline of the server code.
context=zmq.Context()
socket=context.socket(zmq.REP)
socket.bind('tcp://127.0.0.1:5555')
while True:
message=socket.recv()
if message[:2]=="01":
##logic1
if messafe[:2]=="02":
## logic 2
socket.send(response)
I have 2 questions,
- I think the if the message processing logic takes lot of time, how can
I thread the process of processing the message (in Python)
- I need to send an options along with the message, currently I am
sending the options as the first 2 characters of the message. (message[:]).
Is there a better way provided by ZMQ.
Abhishek Kona
Department of Computer Engineering
National Institute of Technology
Karnataka, India
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100824/7ea1f13c/attachment.htm>
More information about the zeromq-dev
mailing list