aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Net/SocketFactory.cs
diff options
context:
space:
mode:
authorNyanmisaka <nst799610810@gmail.com>2020-07-16 21:03:49 +0800
committerGitHub <noreply@github.com>2020-07-16 21:03:49 +0800
commit83a344b62794650dcc7a4319ab88af9028dc1fea (patch)
treeed1d988364a83b738cd6f8504b06f751adf69548 /Emby.Server.Implementations/Net/SocketFactory.cs
parent912946a42793305ecdc6a8c176f1775ffe7ac0de (diff)
parenta9ce8a804fb01cd443c35604e47eb9ad62ba1c54 (diff)
Merge pull request from jellyfin/master
Diffstat (limited to 'Emby.Server.Implementations/Net/SocketFactory.cs')
-rw-r--r--Emby.Server.Implementations/Net/SocketFactory.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Net/SocketFactory.cs b/Emby.Server.Implementations/Net/SocketFactory.cs
index 177721658..0781a0e33 100644
--- a/Emby.Server.Implementations/Net/SocketFactory.cs
+++ b/Emby.Server.Implementations/Net/SocketFactory.cs
@@ -19,6 +19,7 @@ namespace Emby.Server.Implementations.Net
var retVal = new Socket(AddressFamily.InterNetwork, System.Net.Sockets.SocketType.Dgram, System.Net.Sockets.ProtocolType.Udp);
try
{
+ retVal.EnableBroadcast = true;
retVal.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
retVal.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, 1);
@@ -46,6 +47,7 @@ namespace Emby.Server.Implementations.Net
var retVal = new Socket(AddressFamily.InterNetwork, System.Net.Sockets.SocketType.Dgram, System.Net.Sockets.ProtocolType.Udp);
try
{
+ retVal.EnableBroadcast = true;
retVal.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
retVal.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, 4);
@@ -112,6 +114,7 @@ namespace Emby.Server.Implementations.Net
try
{
+ retVal.EnableBroadcast = true;
// retVal.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, true);
retVal.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, multicastTimeToLive);