This repository has been archived by the owner on Jun 10, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes to the RPC subsystem to introduce the notion of "channels". An app can now register an RPC dispatcher to a channel, and messages sent on the channel will be passed to the corresponding dispatcher, which will in turn find and call the correct handler. Example:
This design allows for better separation of concerns particularly on the C# side. Using channel-based rpc is optional.
Also in this PR:
userId
parameter to the rpc handler invocation.UserRPC
vs.ContextRPC
. All rpc happens oncontext
, and an optionaluserId
can be passed to filter the call to a single user. Otherwise it is sent to all users.altspacevr-extras
package.Why this change?
For the Web Projector project (the remote web browser), I needed the id of the user making the rpc call on the Node side so that I could check whether they're authorized to do what they're trying to do. At the same time, I was pondering how to organize the code on the C# side in a nicely separated way. The introduction of channels allows for better code structure, and more succinct rpc procedure naming.