microsoft / microsoft/vs-streamjsonrpc
Dynamic codegen of individual delegates to invoke RPC from client
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 937
- Forks
- 178
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 28
Description
Contract:
public delegate Task DataChange(int v);
server:
do some thing.......
var dataChange=ServerJsonRpc.Attach<DataChange>( ClientInfo); //clientinfo is: client's stream /client's session(like ip and port) and so on
dataChange(newValue);
.......
client:
ClientJsonRpc.AddDelegate<DataChange>((v)=>{Console.WriteLine(...............)});
expect:When the server calls the DataChange delegate, the client will execute: Console.WriteLine(..........);
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing ServerJsonRpc.Attach and ClientJsonRpc.AddDelegate entry points and the DataChange delegate contract described in the issue. Determine how dynamic delegate generation should connect a server-side invocation to the registered client callback, then verify that invoking DataChange on the server causes the client delegate to execute with the value passed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100