You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicstaticvoidMain()=>RunServerAsync().Wait();publicstaticasyncTaskRunServerAsync(){IChannelboundChannel;varbossGroup=newMultithreadEventLoopGroup(1);varworkerGroup=newMultithreadEventLoopGroup();try{varbootstrap=newServerBootstrap();bootstrap.Group(bossGroup,workerGroup);bootstrap.Channel<TcpServerSocketChannel>();bootstrap.Option(ChannelOption.SoBacklog,100).Option(ChannelOption.SoKeepalive,false).ChildHandler(newActionChannelInitializer<ISocketChannel>(channel =>{IChannelPipelinepipeline=channel.Pipeline;pipeline.AddLast(MqttEncoder.Instance,newMqttDecoder(true,64*1024),newMqttHandler());}));boundChannel=awaitbootstrap.BindAsync(1883);Console.WriteLine("mqtt server is start");Console.ReadLine();}catch(Exceptionex){Console.WriteLine("mqtt server failue");}}}
The text was updated successfully, but these errors were encountered:
After my device sends some basic environment information of the device to the server, the mqtt server pings the data sent by the client before.
this sample code
The text was updated successfully, but these errors were encountered: