MiniGod / node-gbxremote

JavaScript port of GbxRemote to communicate with ManiaPlanet / TrackMania servers with Node.js.
MIT License
11 stars 4 forks source link

Multicall support #4

Open tomvlk opened 8 years ago

tomvlk commented 8 years ago

Would be great to have some kind of multicall support. Currently it doesn't right?

MiniGod commented 8 years ago

You are correct, it does not, but I don't see any reason for them unless you want to do atomic operations with multiple methods. Can you give an example case for this?

tomvlk commented 8 years ago

See some code from here: https://github.com/ManiaJS/ManiaJS/blob/master/src/server/client.js#L136 Can be really easy done with mutlicall, (or with simulating multicall maybe, just executing in series and return back).

MiniGod commented 8 years ago

In that case you can use Promise.all.

tomvlk commented 8 years ago

multicall isn't more efficient for network? well, for the performance (and hangs) you don't have to do in JS.