WingMan
/trunk/WingMan/Bindings/KeyBindingsSynchronizer.cs |
@@ -5,7 +5,6 @@ |
using System.Linq; |
using System.Threading; |
using System.Threading.Tasks; |
using MQTTnet; |
using WingMan.Communication; |
|
namespace WingMan.Bindings |
@@ -46,13 +45,15 @@ |
public event MouseKeyBindingsSynchronized OnMouseKeyBindingsSynchronized; |
|
private async void MqttCommunicationOnMessageReceived(object sender, |
MqttApplicationMessageReceivedEventArgs e) |
MqttCommunicationMessageReceivedEventArgs e) |
{ |
if (e.ApplicationMessage.Topic != "exchange") |
if (e.Topic != "exchange") |
return; |
|
using (var memoryStream = new MemoryStream(e.ApplicationMessage.Payload)) |
using (var memoryStream = new MemoryStream()) |
{ |
await e.PayloadStream.CopyToAsync(memoryStream); |
|
memoryStream.Position = 0L; |
|
var mouseKeyBindingsExchange = |
@@ -100,4 +101,4 @@ |
} while (!CancellationToken.IsCancellationRequested); |
} |
} |
} |
} |