mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-19 11:03:07 +08:00
Merge branch 'master' of https://github.com/dotnet/MQTTnet
This commit is contained in:
@@ -24,7 +24,7 @@ A clear and concise description of what the bug is.
|
|||||||
<!-- Remove the items which don't apply from the following list. -->
|
<!-- Remove the items which don't apply from the following list. -->
|
||||||
- Client
|
- Client
|
||||||
- ManagedClient
|
- ManagedClient
|
||||||
- RcpClient
|
- RpcClient
|
||||||
- Server
|
- Server
|
||||||
|
|
||||||
### To Reproduce
|
### To Reproduce
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using MQTTnet.Protocol;
|
|||||||
|
|
||||||
namespace MQTTnet.Samples.RpcClient;
|
namespace MQTTnet.Samples.RpcClient;
|
||||||
|
|
||||||
public static class RcpClient_Samples
|
public static class RpcClient_Samples
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* The extension MQTTnet.Extensions.Rpc (available as nuget) allows sending a request and waiting for the matching reply.
|
* The extension MQTTnet.Extensions.Rpc (available as nuget) allows sending a request and waiting for the matching reply.
|
||||||
@@ -33,7 +33,7 @@ public static class RcpClient_Samples
|
|||||||
|
|
||||||
using (var mqttRpcClient = mqttFactory.CreateMqttRpcClient(mqttClient))
|
using (var mqttRpcClient = mqttFactory.CreateMqttRpcClient(mqttClient))
|
||||||
{
|
{
|
||||||
// Access to a fully featured application message is not supported for RCP calls!
|
// Access to a fully featured application message is not supported for RPC calls!
|
||||||
// The method will throw an exception when the response was not received in time.
|
// The method will throw an exception when the response was not received in time.
|
||||||
await mqttRpcClient.ExecuteAsync(TimeSpan.FromSeconds(2), "ping", "", MqttQualityOfServiceLevel.AtMostOnce);
|
await mqttRpcClient.ExecuteAsync(TimeSpan.FromSeconds(2), "ping", "", MqttQualityOfServiceLevel.AtMostOnce);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user