Removed 3rd-Party libraries.

This commit is contained in:
Christian Kratky
2017-11-22 22:30:55 +01:00
parent e0235aedff
commit 77b80dc53e
66 changed files with 626 additions and 1005 deletions
@@ -9,7 +9,7 @@ using System.Threading.Tasks;
namespace MQTTnet.Implementations
{
public sealed class MqttWebSocketChannel : IMqttCommunicationChannel, IDisposable
public sealed class MqttWebSocketChannel : IMqttChannel, IDisposable
{
// ReSharper disable once MemberCanBePrivate.Global
// ReSharper disable once AutoPropertyCanBeMadeGetOnly.Global
@@ -29,9 +29,16 @@ namespace MQTTnet.Implementations
public async Task ConnectAsync()
{
var uri = _options.Uri;
if (!uri.StartsWith("ws://", StringComparison.OrdinalIgnoreCase))
if (!uri.StartsWith("ws://", StringComparison.OrdinalIgnoreCase) && !uri.StartsWith("wss://", StringComparison.OrdinalIgnoreCase))
{
uri = "ws://" + uri;
if (!_options.TlsOptions.UseTls)
{
uri = "ws://" + uri;
}
else
{
uri = "wss://" + uri;
}
}
_webSocket = new ClientWebSocket();