Interface IEncryptionProtocol
Applies encryption to a PeerConnection.
Inherited Members
Namespace: PeerTalk.Protocols
Assembly: PeerTalk.dll
Syntax
public interface IEncryptionProtocol : IPeerProtocol
Methods
| Improve this Doc View SourceEncryptAsync(PeerConnection, CancellationToken)
Creates an encrypted stream for the connection.
Declaration
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. |