aboutsummaryrefslogtreecommitdiff
path: root/RSSDP/SsdpCommunicationsServer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'RSSDP/SsdpCommunicationsServer.cs')
-rw-r--r--RSSDP/SsdpCommunicationsServer.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/RSSDP/SsdpCommunicationsServer.cs b/RSSDP/SsdpCommunicationsServer.cs
index 64278fe4e..dadb1bff4 100644
--- a/RSSDP/SsdpCommunicationsServer.cs
+++ b/RSSDP/SsdpCommunicationsServer.cs
@@ -260,7 +260,7 @@ namespace Rssdp.Infrastructure
var socket = _SendSocket;
if (socket != null)
{
- await _SendSocket.SendTo(messageData, destination).ConfigureAwait(false);
+ await _SendSocket.SendAsync(messageData, messageData.Length, destination).ConfigureAwait(false);
}
else
{
@@ -290,7 +290,7 @@ namespace Rssdp.Infrastructure
private IUdpSocket CreateSocketAndListenForResponsesAsync()
{
- _SendSocket = _SocketFactory.CreateUdpSocket(_LocalPort);
+ _SendSocket = _SocketFactory.CreateSsdpUdpSocket(_LocalPort);
ListenToSocket(_SendSocket);
@@ -316,7 +316,7 @@ namespace Rssdp.Infrastructure
// Strange cannot convert compiler error here if I don't explicitly
// assign or cast to Action first. Assignment is easier to read,
// so went with that.
- Action processWork = () => ProcessMessage(System.Text.UTF8Encoding.UTF8.GetString(result.Buffer, 0, result.ReceivedBytes), result.ReceivedFrom);
+ Action processWork = () => ProcessMessage(System.Text.UTF8Encoding.UTF8.GetString(result.Buffer, 0, result.ReceivedBytes), result.RemoteEndPoint);
var processTask = Task.Run(processWork);
}
}