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.
 
 
 

37 lines
1.1 KiB

  1. using Microsoft.Extensions.Options;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. namespace JT1078.Gateway.Configurations
  6. {
  7. public class JT1078Configuration : IOptions<JT1078Configuration>
  8. {
  9. public int TcpPort { get; set; } = 1078;
  10. public int UdpPort { get; set; } = 1078;
  11. public int HttpPort { get; set; } = 1079;
  12. public int QuietPeriodSeconds { get; set; } = 1;
  13. public TimeSpan QuietPeriodTimeSpan => TimeSpan.FromSeconds(QuietPeriodSeconds);
  14. public int ShutdownTimeoutSeconds { get; set; } = 3;
  15. public TimeSpan ShutdownTimeoutTimeSpan => TimeSpan.FromSeconds(ShutdownTimeoutSeconds);
  16. public int SoBacklog { get; set; } = 8192;
  17. public int EventLoopCount { get; set; } = Environment.ProcessorCount;
  18. public int ReaderIdleTimeSeconds { get; set; } = 3600;
  19. public int WriterIdleTimeSeconds { get; set; } = 3600;
  20. public int AllIdleTimeSeconds { get; set; } = 3600;
  21. public JT1078RemoteServerOptions RemoteServerOptions { get; set; }
  22. public JT1078Configuration Value => this;
  23. }
  24. }