Class ProtoBufHelper
Helper methods for ProtoBuf.
Inherited Members
Namespace: PeerTalk
Assembly: PeerTalk.dll
Syntax
public static class ProtoBufHelper
Methods
| Improve this Doc View SourceReadMessageAsync<T>(Stream, CancellationToken)
Read a proto buf message with a varint length prefix.
Declaration
public static Task<T> ReadMessageAsync<T>(Stream stream, CancellationToken cancel = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream containing the message. |
CancellationToken | cancel | Is used to stop the task. When cancelled, the TaskCanceledException is raised. |
Returns
Type | Description |
---|---|
Task<T> | A task that represents the asynchronous operation. The task's result is
the |
Type Parameters
Name | Description |
---|---|
T | The type of message. |