From 72aaecb27930e04aa356febf35db2372bc417166 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 4 Nov 2016 14:56:47 -0400 Subject: move classes to new server project --- RSSDP/SsdpCommunicationsServer.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'RSSDP') 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); } } -- cgit v1.2.3