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

  • From: "Garrett D'Amore" <garrett@xxxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Mon, 19 Feb 2018 17:31:17 +0000

Yes,  it really is that simple! :-)

On Mon, Feb 19, 2018 at 6:15 AM Sierwald, Jörn <Joern.Sierwald@xxxxxxxxxxxxx>
wrote:

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: