Jump to content

Recommended Posts

Posted (edited)

Hey, @veers!

Take a look at the single source files I uploaded recently: https://github.com/eisengrind/v-rpc/releases/tag/js-v1.0.1

If you are not using npm at all then you also can use these single source files provided there like this:

var v = require('vrpc-client.min.js');

v.vrpc.callServerAsync('ping', true);

Otherwise you would had to copy the npm package files.

Edited by TheMysteriousVincent
Posted (edited)

No. And that is for a good reason: Since JavaScript is a programming language that runs in only one thread - something like waiting for a result and thus blocking other code executions would be fatal. That is when the Promise comes in handy, because a Promise does not block nor "wait" in the main thread for a result to return, so that other code executions can be continued.

Its a bit more complicated than the short summary above. If you are interested, here is a good explanation on that: https://developers.google.com/web/fundamentals/primers/promises

Edited by TheMysteriousVincent
  • 2 months later...
Posted

wow, thanks for this very cool resource!
but.. why didn't you add methods for calling on one side?
like: vrpc.callSync/vrpc.callAsync

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...