[zeromq-dev] 0MQ/2.0-alpha3 available

Ferenc Szalai szferi at wsbricks.com
Wed Sep 23 13:47:28 CEST 2009


Hi

Martin Sustrik wrote:
> Hi all,
> 
> New version of 0MQ/2.0 was released today:

> Request/reply sockets simplify development of RPC, SOA and client/server 
> applications.

> For instance, to create a server application such as web server it's 
> sufficient to do the following:
> 
> zmq::context_t ctx (1, 1);
> zmq::socket_t s (ctx, ZMQ_REP);
> s.bind ("tcp://eth0:5555");
> 
> while (true) {
>      zmq::message_t request;
>      s.recv (&request);
>      zmq::message_t reply;
> 
>      ... process the request and construct the reply here ...
> 
>      s.send (reply);
> }

What is the recommended way to create multi-thread server application 
using this scenario?

--
Ferenc



More information about the zeromq-dev mailing list