Interface IMessageReceiver
- Namespace
- Signal.Application.Abstractions
- Assembly
- Signal.Application.dll
A source of incoming envelopes for one account. The transport depends on the ExecutionMode:
HTTP polling for normal/native, a WebSocket for json-rpc/json-rpc-native.
public interface IMessageReceiver
Methods
ReceiveAsync(PhoneNumber, CancellationToken)
Streams envelopes until cancellationToken is cancelled. Implementations handle transient
failures (reconnects, retries) internally and only complete when cancelled.
IAsyncEnumerable<IncomingEnvelope> ReceiveAsync(PhoneNumber account, CancellationToken cancellationToken = default)
Parameters
accountPhoneNumberThe account to receive for.
cancellationTokenCancellationTokenStops receiving.
Returns
- IAsyncEnumerable<IncomingEnvelope>
An endless stream of envelopes.