SAP / node-rfc

Asynchronous, non-blocking SAP NW RFC SDK bindings for Node.js
Apache License 2.0
249 stars 73 forks source link

Difference between client.call and client.invoke #321

Open Berdmanfolk opened 3 months ago

Berdmanfolk commented 3 months ago

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

Thanks in advance.

bsrdjan commented 3 months ago

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

Berdmanfolk commented 3 months ago

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.

bsrdjan commented 3 months ago

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

Berdmanfolk commented 3 months ago

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?