Show / Hide Table of Contents

Class Plaintext1

TODO

Inheritance
Object
Plaintext1
Implements
IEncryptionProtocol
IPeerProtocol
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Namespace: PeerTalk.Protocols
Assembly: PeerTalk.dll
Syntax
public class Plaintext1 : IEncryptionProtocol, IPeerProtocol

Properties

| Improve this Doc View Source

Name

The name of the protocol.

Declaration
public string Name { get; }
Property Value
Type Description
String
| Improve this Doc View Source

Version

The version of the protocol.

Declaration
public SemVersion Version { get; }
Property Value
Type Description
Semver.SemVersion

Methods

| Improve this Doc View Source

EncryptAsync(PeerConnection, CancellationToken)

Creates an encrypted stream for the connection.

Declaration
public Task<Stream> EncryptAsync(PeerConnection connection, CancellationToken cancel = default(CancellationToken))
Parameters
Type Name Description
PeerConnection connection

A connection between two peers.

CancellationToken cancel

Is used to stop the task. When cancelled, the TaskCanceledException is raised.

Returns
Type Description
Task<Stream>

A task that represents the asynchronous operation. The task's result is the encrypted stream.

| Improve this Doc View Source

ProcessMessageAsync(PeerConnection, Stream, CancellationToken)

Process a message for the protocol.

Declaration
public Task ProcessMessageAsync(PeerConnection connection, Stream stream, CancellationToken cancel = default(CancellationToken))
Parameters
Type Name Description
PeerConnection connection

A connection between two peers.

Stream stream

The message source.

CancellationToken cancel

Is used to stop the task. When cancelled, the TaskCanceledException is raised.

Returns
Type Description
Task

A task that represents the asynchronous operation.

| Improve this Doc View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
String
Overrides
Object.ToString()

Implements

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