[nanomsg] Re: Detecting connection/disconnection/re-connection

  • From: Roberto Fichera <kernel@xxxxxxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Wed, 6 Dec 2017 18:28:55 +0100

On 12/06/2017 05:44 PM, Garrett D'Amore wrote:

In nanomsg, no there is no direct API for this.  (You can “guess” based on 
statistics reports, but that’s not
guaranteed to be accurate.)

Ok! Can you please point me where I can have a look in the C code so I can 
extend in our local fork?


In nng, there will be event callbacks for these; right now that part of nng’s 
API is not yet implemented.

Ok! That's nice


In mangos (the pure Go implementation of these protocols) there *are* 
notifications on these events.  (See the
SetPortHook method on the socket.)

Ok! Will have a look


On Wed, Dec 6, 2017 at 8:15 AM Roberto Fichera <kernel@xxxxxxxxxxxxx 
<mailto:kernel@xxxxxxxxxxxxx>> wrote:

    Hi All,

    I'm interested to know if there is a way to know when a client 
connect/disconnect or re-connect
    to a particular endpoint. I would like to know this information because I 
need to take some actions
    on client side once the server re-connect and/or disconnect.

    I know that nanomsg handle that transparently, but is there anyway to get 
notified about that?

    Thanks in advance,
    Roberto Fichera.


Other related posts: