[nanomsg] info about multi threaded server and devices

  • From: Andrea Colombo <lgxco2@xxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Mon, 13 Oct 2014 14:59:35 +0400

Hello,
I am new to nanomsg and I am trying to get a better idea on how to use it.

I am trying to create a server with multiple interfaces ( one for each service 
) where each interface is served by multiple worker.
The number of worker may change at runtime as well as the service interfaces. I 
was trying to implementing the server using a device( REP_RAW , REQ_RAW ) and 
socket REP for the workers. The device
will bind TCP port for REP_RAW and will bind to inproc  for REQ_RAW, workers 
will connect to the inproc interface.
Am I doing this correctly or should I use another approach ?

How can I stop a specific device ? From my understanding nn_term() is used to 
close all socket but that is not what I want, I need to only stop the thread 
that is running the device and close the
socket that is uses without interrupting any other devices or socket in the 
application.
Is there any other method ?

Thanks and regards

Andrea


Other related posts:

  • » [nanomsg] info about multi threaded server and devices - Andrea Colombo