[nanomsg] AW: Re: RPC using nng, difficulties

  • From: Sierwald, Jörn <Joern.Sierwald@xxxxxxxxxxxxx>
  • To: "nanomsg@xxxxxxxxxxxxx" <nanomsg@xxxxxxxxxxxxx>
  • Date: Mon, 19 Feb 2018 14:14:39 +0000

I got it running with a surprisingly trivial solution on the REP side (raw 
rep0, Windows):


-          Issue a nng_recv_aio() to get things going.

-          In the callback do:

o   nng_aio_result()

o   nng_aio_get_msg(out msg)

o   nng_recv_aio() // accept next call

o   do stuff

o   nng_msg_clear(msg)

o   nng_msg_append(msg, data)

o   nng_sendmsg(msg)

This works, I checked that the calls are indeed overlapping. The thread limit 
is the depth of nng’s io completion port.
Would this work in Posix?

Jörn

Other related posts: