Skip to main content
Participant
February 17, 2011
Answered

FMS Connector SDK - How to call server method?

  • February 17, 2011
  • 2 replies
  • 1908 views

I am using the FMS Connector C++ to do some publishing work. And I am required to call a server side method.

I have tried to use the INetConnection::call() method, but it don't seems successful.


The FMS server spec told me to do,

1.call server method,

     nc.call("FCPublish" null, streamname);


2. implement a callback function onFCPublsih

     nc.onFCPublish = function (info ) {...}

How can I implement these with FMS Connector C++?

The FMS Connector document include too few topic on calling server side method.

    This topic has been closed for replies.
    Correct answer vijay_das

    In FMS connector SDK, the netconnection call prototype looks like this,

    virtual bool call(const char* funcName, const unsigned char* arguments, unsigned size, OnResultHandler* result) = 0;

    thus you will have to serialize the arguments and then pass it to call function.

    Check out

    bool FMSCTester::testCall(const char* cmd, const char* arg)

    method in FMSCTester sample app that comes with SDK on how to serialize and call the function.

    For server callbacks, you will have to implement a netconnection sink whose onCommand method will be invoked when server calls a method on client.

    The onCommand prototype looks like this,

    void onCommand(const char* cmd, const unsigned char* arguments, unsigned bufLen , IRetValue* retVal )

    again you can check the MyNCSink class in FMSCTester sample project for an implementation of onCommand.

    2 replies

    Participant
    July 27, 2011

    how can get the SDK ?

    vijay_dasCorrect answer
    Adobe Employee
    February 21, 2011

    In FMS connector SDK, the netconnection call prototype looks like this,

    virtual bool call(const char* funcName, const unsigned char* arguments, unsigned size, OnResultHandler* result) = 0;

    thus you will have to serialize the arguments and then pass it to call function.

    Check out

    bool FMSCTester::testCall(const char* cmd, const char* arg)

    method in FMSCTester sample app that comes with SDK on how to serialize and call the function.

    For server callbacks, you will have to implement a netconnection sink whose onCommand method will be invoked when server calls a method on client.

    The onCommand prototype looks like this,

    void onCommand(const char* cmd, const unsigned char* arguments, unsigned bufLen , IRetValue* retVal )

    again you can check the MyNCSink class in FMSCTester sample project for an implementation of onCommand.

    Participant
    April 13, 2013

    Please provide the sdk's download url.