Table of Contents

Interface IReceivingTransportHandlers

Namespace
Pamoja.Core
Assembly
Pamoja.Core.dll

A link that also delivers what it subscribed to.

public interface IReceivingTransportHandlers : ITransportHandlers
Inherited Members

Remarks

A transport built from one of these is listened on: from the moment it connects, ReceiveAsync() is awaited again as soon as it returns, from a thread pamoja owns, and what it delivers is queued for the receiving side. Return null once the link has ended and no further messages will arrive.

An exception from ReceiveAsync() ends the link until the next connect: the next receive throws with its message, and the one after reports the link ended. ReceiveAsync() runs on a thread of its own, beside the other three methods, so state it shares with them must be safe to use from two threads at once.

Methods

ReceiveAsync()

Waits for the next message on a subscribed topic.

Task<TransportMessage?> ReceiveAsync()

Returns

Task<TransportMessage>

The message, or null once the link has ended.