-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: implement Speaker and Serdes #6
Conversation
- Adds protobuf code generation - Adds utilities and wrapping code around RPC message types - Adds RPC protocol code required for sending and receiving messages - Adds a end-to-end test with messages and replies between two Speakers
The RpcMessage<T> type is now implemented directly on the protobuf types using partial classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with the repo structure, the namespaces, and I of course agree that the C# code should be idiomatic C# and not just a translation of the Go code. FWICT the C# API looks good.
LGTM, aside from the earlier RPC.MsgID
thread - can probably just merge this for now?
Rpc/Utilities/TaskUtilities.cs
Outdated
/// A task that completes when all tasks are completed, with the cancellation or exception state of the first | ||
/// non-successful task | ||
/// </returns> | ||
public static async Task CancellableWhenAll(CancellationTokenSource cts, params Task[] tasks) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some inline comments, but overall, I like the shape of the APIs to the protocol.
Closes #3
TODO:
csharp_namespace
option to the upstreamvpn.proto
CancellationTokenSource
into more operations (any asyncSpeaker
operation should use the suppliedCancellationToken
as well as the globalCancellationTokenSource
)TS/TSi
andTR/TRi
into justTS
andTR
with some finangling and changes around theRpcMessage<T>
typeSpeaker
at all