diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-05-24 15:12:55 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-05-24 15:12:55 -0400 |
| commit | f07af448fa11330db93dd7ddcabac37ef9e014c7 (patch) | |
| tree | 1b52a4f73d674a48258c2f14c94117b96ca4a678 /RSSDP | |
| parent | 27c3acb2bfde9025c33f584c759a4038020cb702 (diff) | |
update main projects
Diffstat (limited to 'RSSDP')
| -rw-r--r-- | RSSDP/SsdpCommunicationsServer.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/RSSDP/SsdpCommunicationsServer.cs b/RSSDP/SsdpCommunicationsServer.cs index e9dc4c54f..91004b76f 100644 --- a/RSSDP/SsdpCommunicationsServer.cs +++ b/RSSDP/SsdpCommunicationsServer.cs @@ -177,7 +177,7 @@ namespace Rssdp.Infrastructure { try { - await socket.SendWithLockAsync(messageData, messageData.Length, destination, cancellationToken).ConfigureAwait(false); + await socket.SendToAsync(messageData, 0, messageData.Length, destination, cancellationToken).ConfigureAwait(false); } catch (ObjectDisposedException) { @@ -392,11 +392,13 @@ namespace Rssdp.Infrastructure var t = Task.Run(async () => { var cancelled = false; + var receiveBuffer = new byte[8192]; + while (!cancelled) { try { - var result = await socket.ReceiveAsync(CancellationToken.None).ConfigureAwait(false); + var result = await socket.ReceiveAsync(receiveBuffer, 0, receiveBuffer.Length, CancellationToken.None).ConfigureAwait(false); if (result.ReceivedBytes > 0) { |
