diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2022-07-21 09:42:45 +0200 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2022-07-21 09:42:45 +0200 |
| commit | b01d169d28cb7cfffa33796dfe7bf8be5570593a (patch) | |
| tree | bb859851f91e7066820c1b90234dd2a861a79376 /Emby.Server.Implementations/Udp/UdpServer.cs | |
| parent | f6e41269d94e4c3096b136a47d3616cb0c5fe316 (diff) | |
Implement discovery respecting bind addresses
Diffstat (limited to 'Emby.Server.Implementations/Udp/UdpServer.cs')
| -rw-r--r-- | Emby.Server.Implementations/Udp/UdpServer.cs | 4 |
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); |
