Table of Contents

Interface IMessageListener

Namespace
VpnHood.Core.Client.VpnServices.Abstractions.Messaging
Assembly
VpnHood.Core.Client.VpnServices.Abstractions.dll

Defines the VPN service's side of the channel to the app: it hands each request to a handler and sends its answer back.

public interface IMessageListener : IDisposable
Inherited Members

Methods

Start(MessageHandler, CancellationToken)

Starts listening: each request goes to the handler, and the bytes it returns are the answer.

Task Start(MessageHandler messageHandler, CancellationToken cancellationToken)

Parameters

messageHandler MessageHandler

The handler.

cancellationToken CancellationToken

The token that stops listening, for a transport that owns a loop.

Returns

Task

A task that completes when listening stops, or, for a transport with no loop, once it has begun.

Remarks

The transport owns connections, accepting them and, where it has any, authentication. A transport without a loop stops on Dispose(), which the caller must call either way.