use streams

This commit is contained in:
Eggers Jan
2017-09-13 09:10:41 +02:00
parent 1a1c0beabc
commit 16a184a92f
15 changed files with 329 additions and 435 deletions
@@ -1,6 +1,6 @@
using System.Threading.Tasks;
using MQTTnet.Core.Client;
using System;
using System.IO;
namespace MQTTnet.Core.Channel
{
@@ -9,14 +9,7 @@ namespace MQTTnet.Core.Channel
Task ConnectAsync(MqttClientOptions options);
Task DisconnectAsync();
Task WriteAsync(byte[] buffer);
/// <summary>
/// get the currently available number of bytes without reading them
/// </summary>
int Peek();
Task<ArraySegment<byte>> ReadAsync(int length, byte[] buffer);
Stream Stream { get; }
}
}