aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Udp/UdpServer.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2022-07-21 09:42:45 +0200
committerShadowghost <Ghost_of_Stone@web.de>2022-07-21 09:42:45 +0200
commitb01d169d28cb7cfffa33796dfe7bf8be5570593a (patch)
treebb859851f91e7066820c1b90234dd2a861a79376 /Emby.Server.Implementations/Udp/UdpServer.cs
parentf6e41269d94e4c3096b136a47d3616cb0c5fe316 (diff)
Implement discovery respecting bind addresses
Diffstat (limited to 'Emby.Server.Implementations/Udp/UdpServer.cs')
-rw-r--r--Emby.Server.Implementations/Udp/UdpServer.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Udp/UdpServer.cs b/Emby.Server.Implementations/Udp/UdpServer.cs
index 937e792f5..a3bbd6df0 100644
--- a/Emby.Server.Implementations/Udp/UdpServer.cs
+++ b/Emby.Server.Implementations/Udp/UdpServer.cs
@@ -37,18 +37,20 @@ namespace Emby.Server.Implementations.Udp
/// <param name="logger">The logger.</param>
/// <param name="appHost">The application host.</param>
/// <param name="configuration">The configuration manager.</param>
+ /// <param name="bindAddress"> The bind address.</param>
/// <param name="port">The port.</param>
public UdpServer(
ILogger logger,
IServerApplicationHost appHost,
IConfiguration configuration,
+ IPAddress bindAddress,
int port)
{
_logger = logger;
_appHost = appHost;
_config = configuration;
- _endpoint = new IPEndPoint(IPAddress.Any, port);
+ _endpoint = new IPEndPoint(bindAddress, port);
_udpSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
_udpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);