SAP/node-rfc

Difference between client.call and client.invoke

Berdmanfolk opened this issue · 4 comments

Hello @bsrdjan !
Can you please explain in whicn case using client.call and client.invoke ?

Thanks in advance.

client.invoke is using callback interface and implemented first. client.call has been added later, providing promise interface and client.invoke remained as-is, for backward compatibility. Usage depends on application style. I would recommend client.call, unless callback interface is more appropriate for particular application

Thanks @bsrdjan for the quick response.
Please also tell me which version the client.call() can be used with. Now I'm using version 2.7.0 and I don't have such a method.

but why using 2.7.0 ? It is built with older and not any more supported RFC SDK.

Because I compiled 2.7.0 for nw.js. And at that time the CMake utility was used. Node-gyp utility is currently being used, and I don’t yet know how to compile it for nw.js. Is there any information on how to do this?