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.
 
 
 
 

26 regels
698 B

  1. using Microsoft.AspNetCore;
  2. using Microsoft.AspNetCore.Hosting;
  3. using MQTTnet.AspNetCore;
  4. using System.Threading.Tasks;
  5. namespace MQTTnet.TestApp.AspNetCore2
  6. {
  7. public static class Program
  8. {
  9. public static Task Main(string[] args)
  10. {
  11. return BuildWebHost(args).RunAsync();
  12. }
  13. private static IWebHost BuildWebHost(string[] args) =>
  14. WebHost.CreateDefaultBuilder(args)
  15. .UseKestrel(o =>
  16. {
  17. o.ListenAnyIP(1883, l => l.UseMqtt());
  18. o.ListenAnyIP(5000); // default http pipeline
  19. })
  20. .UseStartup<Startup>()
  21. .Build();
  22. }
  23. }