Files
MQTTnet/Source/MQTTnet/Internal/ExceptionHelper.cs
T
2018-07-07 21:03:31 +02:00

21 lines
487 B
C#

using MQTTnet.Exceptions;
namespace MQTTnet.Internal
{
public static class ExceptionHelper
{
public static void ThrowGracefulSocketClose()
{
throw new MqttCommunicationClosedGracefullyException();
}
public static void ThrowIfGracefulSocketClose(int readBytesCount)
{
if (readBytesCount <= 0)
{
throw new MqttCommunicationClosedGracefullyException();
}
}
}
}