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.
 
 
 

31 line
811 B

  1. using JT808.Gateway.Abstractions;
  2. using JT808.Gateway.SimpleServer.Services;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace JT808.Gateway.SimpleServer.Impl
  8. {
  9. public class JT808SessionProducer : IJT808SessionProducer
  10. {
  11. public string TopicName { get; } = JT808GatewayConstants.SessionTopic;
  12. private readonly JT808SessionService JT808SessionService;
  13. public JT808SessionProducer(JT808SessionService jT808SessionService)
  14. {
  15. JT808SessionService = jT808SessionService;
  16. }
  17. public async void ProduceAsync(string notice,string terminalNo)
  18. {
  19. await JT808SessionService.WriteAsync(notice, terminalNo);
  20. }
  21. public void Dispose()
  22. {
  23. }
  24. }
  25. }