forked from dotnet/MQTTnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
155 changed files
with
3,459 additions
and
1,087 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
Source/MQTTnet.Extensions.ManagedClient/IManagedMqttClientOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
Source/MQTTnet.Extensions.ManagedClient/ManagedMqttClientOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
Source/MQTTnet.Extensions.ManagedClient/ManagedMqttClientOptionsBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...TTnet/Client/IMqttClientAdapterFactory.cs → ...Tnet/Adapter/IMqttClientAdapterFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
using MQTTnet.Exceptions; | ||
using MQTTnet.Protocol; | ||
using MQTTnet.Client.Connecting; | ||
using MQTTnet.Exceptions; | ||
|
||
namespace MQTTnet.Adapter | ||
{ | ||
public class MqttConnectingFailedException : MqttCommunicationException | ||
{ | ||
public MqttConnectingFailedException(MqttConnectReturnCode returnCode) | ||
: base($"Connecting with MQTT server failed ({returnCode}).") | ||
public MqttConnectingFailedException(MqttClientConnectResultCode resultCode) | ||
: base($"Connecting with MQTT server failed ({resultCode.ToString()}).") | ||
{ | ||
ReturnCode = returnCode; | ||
ResultCode = resultCode; | ||
} | ||
|
||
public MqttConnectReturnCode ReturnCode { get; } | ||
public MqttClientConnectResultCode ResultCode { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace MQTTnet.Client.Connecting | ||
{ | ||
public class MqttClientConnectResult | ||
{ | ||
public bool IsSessionPresent { get; set; } | ||
|
||
public MqttClientConnectResultCode ResultCode { get; set; } | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
Source/MQTTnet/Client/Connecting/MqttClientConnectResultCode.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace MQTTnet.Client.Connecting | ||
{ | ||
public enum MqttClientConnectResultCode | ||
{ | ||
Success = 0, | ||
UnspecifiedError = 128, | ||
MalformedPacket = 129, | ||
ProtocolError = 130, | ||
ImplementationSpecificError = 131, | ||
UnsupportedProtocolVersion = 132, | ||
ClientIdentifierNotValid = 133, | ||
BadUserNameOrPassword = 134, | ||
NotAuthorized = 135, | ||
ServerUnavailable = 136, | ||
ServerBusy = 137, | ||
Banned = 138, | ||
BadAuthenticationMethod = 140, | ||
TopicNameInvalid = 144, | ||
PacketTooLarge = 149, | ||
QuotaExceeded = 151, | ||
PayloadFormatInvalid = 153, | ||
RetainNotSupported = 154, | ||
QoSNotSupported = 155, | ||
UseAnotherServer = 156, | ||
ServerMoved = 157, | ||
ConnectionRateExceeded = 159 | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
Source/MQTTnet/Client/Connecting/MqttClientConnectedEventArgs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
|
||
namespace MQTTnet.Client.Connecting | ||
{ | ||
public class MqttClientConnectedEventArgs : EventArgs | ||
{ | ||
public MqttClientConnectedEventArgs(MqttClientConnectResult connectResult) | ||
{ | ||
ConnectResult = connectResult ?? throw new ArgumentNullException(nameof(connectResult)); | ||
} | ||
|
||
public MqttClientConnectResult ConnectResult { get; } | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
Source/MQTTnet/Client/Disconnecting/MqttClientDisconnectOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace MQTTnet.Client.Disconnecting | ||
{ | ||
public class MqttClientDisconnectOptions | ||
{ | ||
public MqttClientDisconnectReason ReasonCode { get; set; } = MqttClientDisconnectReason.NormalDisconnection; | ||
|
||
public string ReasonString { get; set; } | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
Source/MQTTnet/Client/Disconnecting/MqttClientDisconnectReason.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace MQTTnet.Client.Disconnecting | ||
{ | ||
public enum MqttClientDisconnectReason | ||
{ | ||
NormalDisconnection = 0, | ||
|
||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...Client/MqttClientDisconnectedEventArgs.cs → ...ecting/MqttClientDisconnectedEventArgs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.