aboutsummaryrefslogtreecommitdiff
path: root/RSSDP
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-05-24 15:12:55 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-05-24 15:12:55 -0400
commitf07af448fa11330db93dd7ddcabac37ef9e014c7 (patch)
tree1b52a4f73d674a48258c2f14c94117b96ca4a678 /RSSDP
parent27c3acb2bfde9025c33f584c759a4038020cb702 (diff)
update main projects
Diffstat (limited to 'RSSDP')
-rw-r--r--RSSDP/SsdpCommunicationsServer.cs6
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)
{