Skip to main content

Question about how to get server information from plugin

Answered

Comments

4 comments

  • Tagir Gadelshin
    • Network Optix team

    Hi, jeongho kim
    Nx Server provides HTTP API, take a look at https://support.networkoptix.com/hc/en-us/articles/219573367-Nx-Server-HTTP-REST-API

    All required information is available through this API.

    Getting this information via C++ SDK interfaces is not possible yet, but we have this feature in the roadmap.


    1
  • jeongho kim

    Thank you for answer.

    When I try to get information from the metadata-sdk source through API, I need to know the server's ip and port and make a request. In this case, is there any way to know the server's ip and port?

    Does the plug-in assume that the nx server's IP is 127.0.0.1 and the port is 7001?

    0
  • Sergey Yuldashev
    • Network Optix team

    Hi jeongho kim,

    Indeed, if you send some request from the plugin to address 127.0.0.1 and port used by Media Server, it will be processed by the local Media Server. It is guaranteed by the tcp/ip stack.

    I did not mention a particular port value because in theory it might be non-default.
    You could use the OS means to get the port or simply by parsing the Media Server log files. Shortly after Server start there's a line that indicates the used port:

    2021-07-27 15:39:54.954   9538    INFO QnUniversalTcpListener(0x7f907c0c3d70): Server started at 0.0.0.0:7001
    1
  • jeongho kim

    I understood. Thank you for answer.

    0

Please sign in to leave a comment.