Show / Hide Table of Contents

Class ProtoBufHelper

Helper methods for ProtoBuf.

Inheritance
Object
ProtoBufHelper
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: PeerTalk
Assembly: PeerTalk.dll
Syntax
public static class ProtoBufHelper

Methods

| Improve this Doc View Source

ReadMessageAsync<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 T message.

Type Parameters
Name Description
T

The type of message.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX