You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
457 B

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Threading;
  5. namespace JT809.PubSub.Abstractions
  6. {
  7. public interface IJT809Consumer : IJT809PubSub, IJT808ConsumerOfT<byte[]>
  8. {
  9. }
  10. public interface IJT808ConsumerOfT<T> :IDisposable
  11. {
  12. void OnMessage(Action<(string MsgId, T Data)> callback);
  13. CancellationTokenSource Cts { get; }
  14. void Subscribe();
  15. void Unsubscribe();
  16. }
  17. }