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.

Program.cs 640 B

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