aboutsummaryrefslogtreecommitdiff
path: root/RSSDP/SsdpCommunicationsServer.cs
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2019-01-10 19:54:18 -0500
committerGitHub <noreply@github.com>2019-01-10 19:54:18 -0500
commit15c89d281e29578a752dd9828e12e6fa243621a8 (patch)
tree49ad7b46cb06c844affe835e5ed7b8d87deebf4a /RSSDP/SsdpCommunicationsServer.cs
parent3d867c2c46cec39b669bb8647efef677f32b8a8d (diff)
parentbd169e4fd4f5586ab8dad323a520cbcc10de54fe (diff)
Merge pull request #506 from hawken93/linting
Removing tabs and trailing whitespace
Diffstat (limited to 'RSSDP/SsdpCommunicationsServer.cs')
-rw-r--r--RSSDP/SsdpCommunicationsServer.cs31
1 files changed, 14 insertions, 17 deletions
diff --git a/RSSDP/SsdpCommunicationsServer.cs b/RSSDP/SsdpCommunicationsServer.cs
index 65ec0ca71..e2e5c4e9f 100644
--- a/RSSDP/SsdpCommunicationsServer.cs
+++ b/RSSDP/SsdpCommunicationsServer.cs
@@ -20,22 +20,19 @@ namespace Rssdp.Infrastructure
#region Fields
- /*
-
- We could technically use one socket listening on port 1900 for everything.
- This should get both multicast (notifications) and unicast (search response) messages, however
- this often doesn't work under Windows because the MS SSDP service is running. If that service
- is running then it will steal the unicast messages and we will never see search responses.
- Since stopping the service would be a bad idea (might not be allowed security wise and might
- break other apps running on the system) the only other work around is to use two sockets.
-
- We use one socket to listen for/receive notifications and search requests (_BroadcastListenSocket).
- We use a second socket, bound to a different local port, to send search requests and listen for
- responses (_SendSocket). The responses are sent to the local port this socket is bound to,
- which isn't port 1900 so the MS service doesn't steal them. While the caller can specify a local
- port to use, we will default to 0 which allows the underlying system to auto-assign a free port.
-
- */
+ /* We could technically use one socket listening on port 1900 for everything.
+ * This should get both multicast (notifications) and unicast (search response) messages, however
+ * this often doesn't work under Windows because the MS SSDP service is running. If that service
+ * is running then it will steal the unicast messages and we will never see search responses.
+ * Since stopping the service would be a bad idea (might not be allowed security wise and might
+ * break other apps running on the system) the only other work around is to use two sockets.
+ *
+ * We use one socket to listen for/receive notifications and search requests (_BroadcastListenSocket).
+ * We use a second socket, bound to a different local port, to send search requests and listen for
+ * responses (_SendSocket). The responses are sent to the local port this socket is bound to,
+ * which isn't port 1900 so the MS service doesn't steal them. While the caller can specify a local
+ * port to use, we will default to 0 which allows the underlying system to auto-assign a free port.
+ */
private object _BroadcastListenSocketSynchroniser = new object();
private ISocket _BroadcastListenSocket;
@@ -443,7 +440,7 @@ namespace Rssdp.Infrastructure
private void ProcessMessage(string data, IpEndPointInfo endPoint, IpAddressInfo receivedOnLocalIpAddress)
{
//Responses start with the HTTP version, prefixed with HTTP/ while
- //requests start with a method which can vary and might be one we haven't
+ //requests start with a method which can vary and might be one we haven't
//seen/don't know. We'll check if this message is a request or a response
//by checking for the HTTP/ prefix on the start of the message.
if (data.StartsWith("HTTP/", StringComparison.OrdinalIgnoreCase))