mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-30 19:55:08 -04:00
Use file-scoped namespaces in Jellyfin.Networking
This commit is contained in:
parent
1b821efcf2
commit
eea676429b
@ -16,13 +16,13 @@ using MediaBrowser.Controller.Plugins;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Mono.Nat;
|
||||
|
||||
namespace Jellyfin.Networking
|
||||
namespace Jellyfin.Networking;
|
||||
|
||||
/// <summary>
|
||||
/// Server entrypoint handling external port forwarding.
|
||||
/// </summary>
|
||||
public sealed class ExternalPortForwarding : IServerEntryPoint
|
||||
{
|
||||
/// <summary>
|
||||
/// Server entrypoint handling external port forwarding.
|
||||
/// </summary>
|
||||
public sealed class ExternalPortForwarding : IServerEntryPoint
|
||||
{
|
||||
private readonly IServerApplicationHost _appHost;
|
||||
private readonly ILogger<ExternalPortForwarding> _logger;
|
||||
private readonly IServerConfigurationManager _config;
|
||||
@ -192,5 +192,4 @@ namespace Jellyfin.Networking
|
||||
|
||||
_disposed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30,15 +30,15 @@ using System.Net.Sockets;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Jellyfin.Networking.HappyEyeballs
|
||||
namespace Jellyfin.Networking.HappyEyeballs;
|
||||
|
||||
/// <summary>
|
||||
/// Defines the <see cref="HttpClientExtension"/> class.
|
||||
///
|
||||
/// Implementation taken from https://github.com/ppy/osu-framework/pull/4191 .
|
||||
/// </summary>
|
||||
public static class HttpClientExtension
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the <see cref="HttpClientExtension"/> class.
|
||||
///
|
||||
/// Implementation taken from https://github.com/ppy/osu-framework/pull/4191 .
|
||||
/// </summary>
|
||||
public static class HttpClientExtension
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the client should use IPv6.
|
||||
/// </summary>
|
||||
@ -116,5 +116,4 @@ namespace Jellyfin.Networking.HappyEyeballs
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,13 +18,13 @@ using static MediaBrowser.Controller.Extensions.ConfigurationExtensions;
|
||||
using IConfigurationManager = MediaBrowser.Common.Configuration.IConfigurationManager;
|
||||
using IPNetwork = Microsoft.AspNetCore.HttpOverrides.IPNetwork;
|
||||
|
||||
namespace Jellyfin.Networking.Manager
|
||||
namespace Jellyfin.Networking.Manager;
|
||||
|
||||
/// <summary>
|
||||
/// Class to take care of network interface management.
|
||||
/// </summary>
|
||||
public class NetworkManager : INetworkManager, IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Class to take care of network interface management.
|
||||
/// </summary>
|
||||
public class NetworkManager : INetworkManager, IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Threading lock for network properties.
|
||||
/// </summary>
|
||||
@ -1122,5 +1122,4 @@ namespace Jellyfin.Networking.Manager
|
||||
_logger.Log(logLevel, "Filter list: {0}", _remoteAddressFilter.Select(s => s.Prefix + "/" + s.PrefixLength));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,13 +3,13 @@ using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using MediaBrowser.Model.Net;
|
||||
|
||||
namespace Jellyfin.Networking.Udp
|
||||
namespace Jellyfin.Networking.Udp;
|
||||
|
||||
/// <summary>
|
||||
/// Factory class to create different kinds of sockets.
|
||||
/// </summary>
|
||||
public class SocketFactory : ISocketFactory
|
||||
{
|
||||
/// <summary>
|
||||
/// Factory class to create different kinds of sockets.
|
||||
/// </summary>
|
||||
public class SocketFactory : ISocketFactory
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public Socket CreateUdpBroadcastSocket(int localPort)
|
||||
{
|
||||
@ -35,5 +35,4 @@ namespace Jellyfin.Networking.Udp
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,13 +11,13 @@ using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using static MediaBrowser.Controller.Extensions.ConfigurationExtensions;
|
||||
|
||||
namespace Jellyfin.Networking.Udp
|
||||
namespace Jellyfin.Networking.Udp;
|
||||
|
||||
/// <summary>
|
||||
/// Provides a Udp Server.
|
||||
/// </summary>
|
||||
public sealed class UdpServer : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides a Udp Server.
|
||||
/// </summary>
|
||||
public sealed class UdpServer : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// The _logger.
|
||||
/// </summary>
|
||||
@ -133,5 +133,4 @@ namespace Jellyfin.Networking.Udp
|
||||
_udpSocket.Dispose();
|
||||
_disposed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,13 +13,13 @@ using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using IConfigurationManager = MediaBrowser.Common.Configuration.IConfigurationManager;
|
||||
|
||||
namespace Jellyfin.Networking
|
||||
namespace Jellyfin.Networking;
|
||||
|
||||
/// <summary>
|
||||
/// Class responsible for registering all UDP broadcast endpoints and their handlers.
|
||||
/// </summary>
|
||||
public sealed class UdpServerEntryPoint : IServerEntryPoint
|
||||
{
|
||||
/// <summary>
|
||||
/// Class responsible for registering all UDP broadcast endpoints and their handlers.
|
||||
/// </summary>
|
||||
public sealed class UdpServerEntryPoint : IServerEntryPoint
|
||||
{
|
||||
/// <summary>
|
||||
/// The port of the UDP server.
|
||||
/// </summary>
|
||||
@ -140,5 +140,4 @@ namespace Jellyfin.Networking
|
||||
_udpServers.Clear();
|
||||
_disposed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user