MQTTnet.EventBus
快速开始
在您的ASP.NET Core Startup.cs文件中,添加以下内容
public void ConfigureServices ( IServiceCollection services )
{
// ...
var retryCount = 5 ;
services . AddMqttEventBus ( cfg =>
{
cfg
. WithClientId ( " Api " )
. WithTcpServer ( " {Ip Address} " , port : 1883 );
}, retryCount );
services . AddTransient < MyEventHandler>();
}
EventH
评论0
最新资源