Is the Nx Cloud up? Visit our Status Page for the current health and performance of the Nx Cloud.

Status Page

Background HTTP server in plugin

Answered

Comments

5 comments

  • Andrey Terentyev
    • Network Optix team

    Hello,

    Could you please do the following?

    Take a sample_analytics_plugin in the Metadata SDK.
    Put your code dealing with HTTP server there.
    Try to reproduce the issue.
    Share the plugin code here. Just publish a link to the archive file.

     

     

     

    0
  • Graham Parry

    Hi Andrey
    Will do that.  In principle though is there any reason why threading would upset the server service starting?  The plugin behaves OK if I don't try and run the mini server separately.

     

     

    0
  • Andrey Terentyev
    • Network Optix team

    Hi,

    In principle though is there any reason why threading would upset the server service starting?

    A bug in your code, most probably. Lost pointer or something similar.

    For example, in your code snippet, vnet * vnetptr is a local variable and is destroyed once the  DeviceAgent::DeviceAgent() method exits. Probably, you should declare and use a private member of the vnet * vnetptr type inside the DeviceAgent class.

    0
  • Graham Parry

    Thanks.  Actually I may just have solved the issue I was inquiring about.  It's all a bit experimental at the moment as I find my way around the plugin, but I seem to have my server running again and the NX Server is stable.   Will obviously get back if I'm stuck, but I'll bear your thoughts in mind when doing any threading.

    0
  • Thinh

    hi Graham Parry, would you mind showing me the way you deal with it, I currently try to implement the same idea but cant find place to init the http server

    0

Please sign in to leave a comment.