Merge branch 'master' into network-rewrite

This commit is contained in:
Shadowghost
2022-10-07 09:04:41 +02:00
121 changed files with 625 additions and 1076 deletions

View File

@@ -63,10 +63,7 @@ namespace Emby.Server.Implementations.Net
/// <inheritdoc />
public ISocket CreateUdpMulticastSocket(IPAddress ipAddress, IPAddress bindIpAddress, int multicastTimeToLive, int localPort)
{
if (ipAddress == null)
{
throw new ArgumentNullException(nameof(ipAddress));
}
ArgumentNullException.ThrowIfNull(ipAddress);
if (bindIpAddress == null)
{

View File

@@ -35,10 +35,7 @@ namespace Emby.Server.Implementations.Net
public UdpSocket(Socket socket, int localPort, IPAddress ip)
{
if (socket == null)
{
throw new ArgumentNullException(nameof(socket));
}
ArgumentNullException.ThrowIfNull(socket);
_socket = socket;
_localPort = localPort;
@@ -51,10 +48,7 @@ namespace Emby.Server.Implementations.Net
public UdpSocket(Socket socket, IPEndPoint endPoint)
{
if (socket == null)
{
throw new ArgumentNullException(nameof(socket));
}
ArgumentNullException.ThrowIfNull(socket);
_socket = socket;
_socket.Connect(endPoint);